News for hackers. Stuff that matters.
Re:Scala is Not a Functional Programming Language by stephenjudkins on Thursday May 14, 2009 @09:14PM (#609848)
It seems he may have some good points, but he definitely tried pretty hard to make some of the examples ugly. The way currying is generally done in Scala is much cleaner-looking than this, as the first several google results for "scala currying" show. Also, he seems to throw in some extra unnecessary stuff (sealed?) in the case classes example.

I appreciate informed criticisms like this, but he is definitely representing Scala in as poor a light as possible.

Re:Scala is Not a Functional Programming Language by mrkurt on Thursday May 14, 2009 @09:52PM (#609879)
He speaks to the currying syntax directly in the comments. The important distinction is that the "nice" Scala syntax for currying requires that you allow for it when you write your functions. That's not really broadly useful, though it can pretty up some applications.
Re:Scala is Not a Functional Programming Language by KrisJordan on Thursday May 14, 2009 @10:37PM (#609926)
From reading Odersky's book Scala's notion of currying functions i.e. f(x:Int)(y:Int) is differentiated from partially applied functions. Here is his currying example using a partially applied x():

def x(a:Int, b:Int) = a + b

val y = x(1, _:Int) // y is a partially applied function

y(2)

==========

Much better looking than his snippet:

def x(a:Int, b:Int) = a + b

def y = Function.curried(x _)(1)

y(2)

Re:Scala is Not a Functional Programming Language by mindslight on Thursday May 14, 2009 @08:48PM (#609832)
I remember it initially being described as a hybrid language, but obviously the functional features and idioms stick out more to the Java community, so it's going to be described as functional.

I do wonder why Scala requires 'def' to be within a class/body (it could just create an implicit object inheriting from FunctionX)

Also, destructuring pattern matching does require language support (the linked example only involves simple predicates)

Re:Scala is Not a Functional Programming Language by ontilt on Thursday May 14, 2009 @09:10PM (#609846)
I've been hacking in Java, Ruby, and Haskell for some time and when I started learning Scala, I quickly came to the conclusion that it was much more like Ruby than it is like Haskell.
Re:Scala is Not a Functional Programming Language by ontilt on Thursday May 14, 2009 @09:21PM (#609855)
...not that there's anything wrong with that. I love the conciseness of Scala compared to Java and, even if it's not as elegant as a pure functional language, it seems like a great language for Getting Things Done.
Re:Scala is Not a Functional Programming Language by xtho on Friday May 15, 2009 @03:44AM (#610223)
I wonder if by the author's standards lisp/scheme were a functional language?
[dead]
Re:Scala is Not a Functional Programming Language by Maro on Friday May 15, 2009 @02:21AM (#610166)
It'd be nice if links in downvoted comments would get grayed out like the text.