Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Best Scala starter resources

 
Ranch Hand
Posts: 48
MicroProfile Quarkus Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having come across a lot of resources out there for learning Scala from books, videos to online documentation... I wanted to know based on more experienced Scala developers on what do they suggest as a starting point to shift gradually from OO Java oriented style to FP Scala one?
 
Author
Posts: 23
8
Mac OS X Scala Monad
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I can promote my own book, ;) I assume prior OOP experience, but no FP experience. I explain and emphasize the FP features first, to encourage people to use them who might tend to use more familiar OOP features. Then I discuss OOP details.

One thing I love about Scala is the way it uses OOP and FP as complementary features, providing the best of both paradigms. There are even features that make OOP programming, i.e., class hierarchies more robust for users:

1. You can prevent subclasses when the ones you defined are the only "logically sensible" subclasses for an abstraction that should be allowed.
2. There is a new mechanism that supports #1, but allows special case subclassing, such as when you write a test and want to subclass the tested class to stub out some of its behavior.
3. Scala traits provide richer "mixing" behaviors than Java interfaces with default method implementations.
4. Not widely used, but the private, protected, and public scopes exist with enhancements to scope the reach of private and protected (e.g., make it protected for this package and all packages under the parent package...).

-- Dean
 
Marouane Trabelsi
Ranch Hand
Posts: 48
MicroProfile Quarkus Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Dean,

Thanks for the concise elaboration on what the book covers. From illustrated points, I would say it makes a very good starting point.

Other than the book, would you recommend other resources? A covered in the original OP, it's all about an imperative / OOP / Java developer standing point.

Marouane,
 
Dean Wampler
Author
Posts: 23
8
Mac OS X Scala Monad
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are lots of people who've written blog posts and done videos about OOP vs. FP. I don't have a recommendation about which ones are good. However, a few very good books that explore this subject directly are Neal Ford's "Functional Thinking" and the Manning books "Functional Programming in Scala" and "Functional Programming in Java", which are a bit more advanced.

-- Dean
 
Marouane Trabelsi
Ranch Hand
Posts: 48
MicroProfile Quarkus Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again for the book recommendations, will look in the mentioned items and maybe re-post back once gone through.

Marouane.
 
Sheriff
Posts: 16940
286
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm currently reading "Grokking Simplicity - Taming complex software with functional thinking" by Eric Normand with forewords by Guy Steele and Jessica Kerr, also from Manning.

I think it's a very good introduction to functional programming.
 
Dean Wampler
Author
Posts: 23
8
Mac OS X Scala Monad
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, I forgot about that book! I have it on my reading list ;) Thanks for mentioning it.

-- Dean
 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic