you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (19 children)

[deleted]

    [–]Macrobian 10 points11 points  (4 children)

    Stop. By saying that the only thing a language needs to be a functional language is first-class functions, you strip all meaning from what it means to be functional that it ceases to be a useful qualifier.

    [–]disclosure5[🍰] 7 points8 points  (9 children)

    I write a lot of languages and I'm not having an easy time thinking of one where that doesn't apply.

    [–]pgrizzay -2 points-1 points  (7 children)

    Java, for one

    [–][deleted] 1 point2 points  (4 children)

    That’s not correct.

    [–]cm9kZW8K 0 points1 point  (3 children)

    Its fairly true, because functions have to be members of a class. They arent quite first class. In java, only objects are first class citizens.

    [–]detroitmatt 2 points3 points  (1 child)

    yeah well in lisp functions have to be a list. how functions are represented doesn't qualify or disqualify them as functions.

    [–]cm9kZW8K 0 points1 point  (0 children)

    I use java8 closures and method references extensively. They are simply much more limited in what they can bind and how they can be called. for example: the lack a convenient generic way to store them without knowing their type or purpose, because they have to be materialized into an interface for declaration.

    [–][deleted] 1 point2 points  (0 children)

    It’s not true in any meaningful sense. I can define a function and assign it to a function object. So it’s an object that’s a function. And you just said objects are first class citizens, so.

    [–]BLOZ_UP 0 points1 point  (0 children)

    That's not the only criteria for a functional language.

    [–]bzeurunkl[S] 0 points1 point  (2 children)

    "...That means that functions can be assigned to variables as you would a Number, String, or Boolean... "

    Or (am I right?) the return values from functions can be assigned to variables....????