News for hackers. Stuff that matters.
Re:Ask HN: How to be fluent in functional language speak? by rb808 on Tuesday May 05, 2020 @05:30PM (#23085301)
Give up while you can. Immutable data classes and functional pipelines are great, everything else isn't worth it. Lots of people say FP is amazing but very few people use it in the real world because like you say, its unintelligible.
Re:Ask HN: How to be fluent in functional language speak? by centimeter on Tuesday May 05, 2020 @05:30PM (#23085309)
This comment is a textbook example of the Blub Paradox.
Re:Ask HN: How to be fluent in functional language speak? by dllthomas on Tuesday May 05, 2020 @05:34PM (#23085339)
I had a very visceral experience of Blub in my formative years. I don't recall how old I was, certainly under 11. I was explaining to my father the many things I could do in LOGO, and he asked about arrays. LOGO supports arrays, of course, but it was beyond anything I'd dealt with. I remember that feeling of entirely not understanding why you'd want to bother with arrays instead of just making more variables.
Re:Ask HN: How to be fluent in functional language speak? by centimeter on Tuesday May 05, 2020 @05:39PM (#23085402)
I had a similar experience also at age 11 - I was learning C++ to solve my math homework problems. I heard about Python, tried it out, and went on IRC to ask how I could write "goto" statements in Python. I couldn't believe it when people told me they weren't necessary, and linked "Go To Considered Harmful"!
Re:Ask HN: How to be fluent in functional language speak? by dllthomas on Tuesday May 05, 2020 @06:36PM (#23085943)
Oh man, some of my LOGO programs had so many gotos.
Re:Ask HN: How to be fluent in functional language speak? by AnimalMuppet on Wednesday May 06, 2020 @11:58AM (#23092503)
For the record, the Blub Paradox is wrong. It hinges on being able to rank computer languages on a one-dimensional axis labeled "power". It turns out that you can't actually do that.

For example, the Lisp people are sure they're looking down when they look at Haskell - no macros. But the Haskell people are also sure they're looking down when they look at Lisp - no decent type system. But if they're both looking down at the other, that's kind of a problem for the Blub Paradox.

Here's the other problem with it: I don't care about "power" in languages in any platonic sense; I care about power to write the specific program I'm trying to write. That includes the language's expressiveness, sure, but it also includes available libraries and the rest of the ecosystem, tutorials if there's parts I have to learn, the ability to find others who are proficient if the program is big enough to need a team, and so on. The power to write my specific program depends on the problem, not just on the language.

Re:Ask HN: How to be fluent in functional language speak? by centimeter on Wednesday May 06, 2020 @07:05PM (#23097479)
I think both Lispers and Haskellers would be willing to agree that they're both more powerful on most axes than, say, Java.
Re:Ask HN: How to be fluent in functional language speak? by rb808 on Tuesday May 05, 2020 @09:51PM (#23087184)
You're welcome. I like to think its more than that though. I recognize Spark as FP built app but its a rarity among thousands of large mainstream applications. Do you have many non-trivial examples of applications written in a functional style?
Re:Ask HN: How to be fluent in functional language speak? by mLuby on Tuesday May 05, 2020 @05:45PM (#23085447)
Thanks for introducing me to the Blurb Paradox!

Though on first glance, doesn't it suggest that all programming features are good, and only their absence is bad? St. Exupéry's idea of perfection would disagree.

Re:Ask HN: How to be fluent in functional language speak? by jolux on Tuesday May 05, 2020 @06:02PM (#23085614)
No, because it is possible to add power without adding features. This is typically called generality. In fact, adding features really can’t do much to change how fundamentally expressive a language is.
Re:Ask HN: How to be fluent in functional language speak? by searchableguy on Tuesday May 05, 2020 @05:50PM (#23085500)
I am not sure. Approximately 5-10% of of tools I interact with are written in Haskell. So I think you are wrong.

Lot of webdev stuff is moving to functional paradigms. Lazy evaluation, streams/iterator pattern combined with map/reduce/filter (FRP). You can pick out any modern ui framework and you would be drowning in fp soon enough.

Many attempts at building a functional language for web - purescript, elm, reasonml etc.

Re:Ask HN: How to be fluent in functional language speak? by triyambakam on Tuesday May 05, 2020 @06:41PM (#23085982)
I use FP everyday, but I'm not an academic and I couldn't tell you what a monad is. But I do know about closures, lambdas, filter, map, reduce, arity and other basic concepts. I prefer to write functions instead of classes (JS/TS). So I'm not a wizard, but FP is helpful even at an elementary level