jducoeur: (Default)
jducoeur ([personal profile] jducoeur) wrote2011-04-13 04:21 pm
Entry tags:

Programming in Scala (kind of) available online

For those curious about my frequent rhapsodies about Scala, you may want to check out the bible of the subject, which has just been published online for free.

There is, of course, a gotcha: this is the first edition of the book, not the second, so it doesn't talk about the fairly major improvements in the current 2.8 release of the language, much less the soon-to-be-released 2.9. But it's still 95% accurate and covers 90% of the interesting topics, so it's a convenient way to check out all of the ins and outs of the language for free...

[identity profile] metageek.livejournal.com 2011-04-15 12:07 pm (UTC)(link)

I've started working through this. I was delighted to realize that a Map could be used as a function:

val m=Map("foo" -> "bar", "baz" -> "quux", "fred" -> "barney")

List("foo","fred","foo","baz").map(m)

[identity profile] metageek.livejournal.com 2011-04-15 02:59 pm (UTC)(link)
Python does a lot of DWIM (e.g., for-loop over arbitrary collections, [] into anything that makes sense), but all within its paradigm; it's pretty sparse on functional features.