aspose file tools*
The moose likes Scala and the fly likes Question on Functional Programming in Scala Book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark "Question on Functional Programming in Scala Book" Watch "Question on Functional Programming in Scala Book" New topic
Author

Question on Functional Programming in Scala Book

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9427
    
    2

How does this book compare to the already available Scala books from typesafe? I guess what is needed is a Scala book in the form of a Head First style of writing. Does this book compares itself to a Head First writing style?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1775
    
  14

I'm curious about how you actually learn to apply FP for regular application development in Scala. I completed the Odersky FP in Scala course on Coursera last year, and I've read (and worked through parts of) a number of books on Scala, but I'm still finding it hard to get my head around the best way to acquire and build practical development skills in FP and Scala. There's a huge leap from the FP "hello world" of Fibonacci series to implementing real-world applications using FP, and - unlike the OO world - not much in the way of practical guidance to take you from beginner to even basic competence.

I'm also confused by the gap between the needs of regular application development e.g. for a routine web app, and the obsession with arcane type-algebra in many Scala tutorials: it often feels like Scala is basically a type system with a language bolted on as an afterthought. There must be a more straightforward and pragmatic way to work your way up from novice to basic competence with FP in Scala, surely? Or does everything depend on acquiring a profound understanding of monads and monoids before you can even get started?

No more Blub for me, thank you, Vicar.
Runar Bjarnason
author
Greenhorn

Joined: Feb 18, 2014
Posts: 12
Joe Harry:

Functional Programming in Scala is different from other Scala books in that it's fundamentally about functional programming (FP) rather than being about Scala per se. There are lots of ways to write programs in Scala, but this book tries to get the reader immersed in the purely functional way of programming. We think that this incidentally streamlines the process of learning Scala as well, since Scala has many language features that are not really relevant to FP. Here's an excerpt from the preface:

This is not a book about Scala. This book is an introduction to functional programming (FP), a radical, principled approach to writing software. We use Scala as the vehicle to get there, but you can apply the lessons herein to programming in any language. As you work through this book, our goal will be for you to gain a firm grasp of functional programming concepts, and the ability to comfortably absorb new material on the subject, beyond what we cover here.


I can't answer your second question about how it compares to a "Head First" style, since I have never read a book in that style. But this book will definitely take you head first into functional programming. We hope you have fun with it!
Runar Bjarnason
author
Greenhorn

Joined: Feb 18, 2014
Posts: 12
chris webster:

In the book, we try to provide that practical guidance on FP that is missing from most books on Scala and from online courses and tutorials. We take you all the way from basic familiarity with FP concepts, through building a suite of practical libraries (for e.g. parallel execution, unit testing, and text parsing), all the way to advanced topics like streaming I/O. In the beginning we don't expect any prior knowledge of FP, but when you're done with the book you should have enough to try your hand at writing a purely functional web server, for example.

We don't believe you need to know about monoids and monads to get started. We cover those topics starting in part 3 of the book (chapters 10-12). But before we get to that, part 1 will give you basic familiarity with FP, and part 2 will give you practice and confidence writing your own purely functional libraries. By the time you come to chapter 11 on monads, you will see that it's just giving a name to a pattern that you will have seen over and over throughout the chapters before it.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9427
    
    2

Rãºnar Bjarnason wrote:chris webster:

In the book, we try to provide that practical guidance on FP that is missing from most books on Scala and from online courses and tutorials. We take you all the way from basic familiarity with FP concepts, through building a suite of practical libraries (for e.g. parallel execution, unit testing, and text parsing), all the way to advanced topics like streaming I/O. In the beginning we don't expect any prior knowledge of FP, but when you're done with the book you should have enough to try your hand at writing a purely functional web server, for example.

We don't believe you need to know about monoids and monads to get started. We cover those topics starting in part 3 of the book (chapters 10-12). But before we get to that, part 1 will give you basic familiarity with FP, and part 2 will give you practice and confidence writing your own purely functional libraries. By the time you come to chapter 11 on monads, you will see that it's just giving a name to a pattern that you will have seen over and over throughout the chapters before it.


This seems promising to me and making me feel to get a hand on the book.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Functional Programming in Scala Book