News for hackers. Stuff that matters.
Re:Who cares about functional programming? by mosdl on Monday September 23, 2019 @11:28AM (#21049808)
Lots of words without much value, just like FP!

Seriously, why is this on the homepage? Doesn't contain anything interesting about FP.

Re:Who cares about functional programming? by asp_net on Monday September 23, 2019 @11:35AM (#21049882)
Actually you are usually writing much less code with FP approaches ;-).
Re:Who cares about functional programming? by hans1729 on Monday September 23, 2019 @11:38AM (#21049914)
>Lots of words without much value, just like FP!

not sure if

a) people didn't get the pun

b) the pun wasn't intended

or c) both

:thinking:

Re:Who cares about functional programming? by DonaldPShimoda on Monday September 23, 2019 @11:44AM (#21049964)
It's a bad pun, if it was meant as one. FP is all values and few words, compared to OO languages.
Re:Who cares about functional programming? by TurboHaskal on Monday September 23, 2019 @11:53AM (#21050058)
I am not sure if you have been paying attention to the strongly typed, category theory zealots lately (who seem to claim they hold the one and only valid functional programming viewpoint). The size of vocabulary and relations they end up juggling put any over engineered OO system to shame.

It is attracting the same kind of people that 15 years ago would have reached for (and preached) the GoF book.

Re:Who cares about functional programming? by DonaldPShimoda on Monday September 23, 2019 @12:01PM (#21050128)
> I am not sure if you have been paying attention to the strongly typed, category theory zealots lately

Well (1) this is not inherent to all functional programming, and (2) the joke appears to imply that code written in FP will be more verbose with less content, which is surely not the case. (And also (3) I'm guessing you meant "statically typed" instead of "strongly typed", since the latter is poorly defined and not generally the subject of discussion among functional programmers that I've interacted with.)

I also have met quite a few people who are into category theory, and none of them have made any claim about holding "the one and only valid functional programming viewpoint". But the people I talk to are genuine academic researchers and not armchair academicians, so perhaps there's a difference there.

Re:Who cares about functional programming? by TurboHaskal on Monday September 23, 2019 @12:14PM (#21050289)
You are right on all points.

As for the category theory zealots I have found at work or at conferences, none of them were academics, but rather what I would describe as clueless narcissists overdosed on FP Kool-aid.

Re:Who cares about functional programming? by DonaldPShimoda on Monday September 23, 2019 @12:18PM (#21050334)
Ah yeah, that's the unfortunate part of those communities haha. But every community has some of those. :)

When you say "conferences", do you mean academic conferences or industry/language-specific conferences?

I found that there were plenty of people deep into category theory at ICFP this year (an academic conference), but most of them had very reasonable perspectives on the utility of CT and things to that effect.

Re:Who cares about functional programming? by hans1729 on Monday September 23, 2019 @11:52AM (#21050042)
meh, to me the term "value" only makes sense in a mutable context - if the variable can't be mutated, it is it's own value. but let's not get lost in semantics over a joke (the more because we don't even know wether it was intended)
Re:Who cares about functional programming? by DonaldPShimoda on Monday September 23, 2019 @12:05PM (#21050169)
> to me the term "value" only makes sense in a mutable context - if the variable can't be mutated, it is it's own value

I'm so confused by this haha.

A value is a term in a language's grammar that cannot be further reduced by the semantics of that language.

In some OO languages, objects may be values but functions or types may not. (Though this has been changing lately as more OO languages are getting on board with higher-order functions, for example.)

In most FP languages, functions and types are also values. In the lambda calculus, two out of the three possible terms are values. In the pi calculus, types become values (and, therefore, values become types).

This is where I was going with my previous comment: FP languages tend to have a wider variety of "values" than the OO languages, which instead just have lots of extra core forms in the language that don't directly translate to the values of the language's semantics.

Re:Who cares about functional programming? by meowface on Monday September 23, 2019 @11:42AM (#21049947)
I don't get the pun. Could you explain?
Re:Who cares about functional programming? by hans1729 on Monday September 23, 2019 @11:49AM (#21050007)
Immutability is important in FP, lots of functional languages don't even have a var-keyword - they don't deal with values in the sense that oop or imperative languages do.

(Instead, they just functionally transform shallow copies of input data, iirc this paradigm is called 'data driven programming')

...so, yeah, "no values" relative to the amount of words used in FP. The pun needs a bit of a stretch, but I'd take it ¯\_(ツ)_/¯

Re:Who cares about functional programming? by elwell on Monday September 23, 2019 @11:35AM (#21049883)
Clojure is an FP language. Clojure is relatively terse.