Live data from Hacker News

Is Haskell really the language of geniuses and academia? (2019)

habr.com

31–40 of 83 posts

Re: Is Haskell really the language of geniuses and academia? (2019)

#31
I think it's better to put aside the hype about "geniuses" and break this down into two separate questions:

1. Is functional programming really better than other approaches? (My opinion: Yes, for most applications, although it can sometimes feel more difficult.)

2. Is Haskell really better than other functional programming languages. (My opinion: Haskell has some powerful features that other FP languages lack, but it is often less practical.)

Bottom line: The most important thing is to grok functional programming as a paradigm. There are several good functional programming languages to choose from. Personally, I'm a big fan of F#.

Re: Is Haskell really the language of geniuses and academia? (2019)

#32
post #16

There are two issues that are really hard to articulate in a language critique: 1) There is no easy way to learn the language. Try explaining that without looking ignorant. 2) The software written in this language is too hard to read and understand. Do either of these problems manifest in Haskell? No idea. But I've seen them manifest in other systems and once I know about them suddenly there is an obvious and suspici…

I've tried to articulate this through pointing out that the documentation culture of Haskell is lacking and indeed I've been called "willingly ignorant, and proud to state that fact publicly"

IMO thats really the only remaining problem of Haskell. Most of its documentation is just plain terrible. Rust is probably more difficult to learn as a language, yet the documentation culture is so awesome that one can power through.

Re: Is Haskell really the language of geniuses and academia? (2019)

#33
post #8

In my experience, people who ask questions like "why should I learn about X when I don't already see its practical applications" are just not people who learn a lot of things, relatively and generally speaking. That's not a value judgment, just an observation. I don't think it takes any special ability or particular intelligence to be drawn to a language like Haskell-- All you really need is real genuine curiosity, a…

There are many things competing for people's time and attention. Why should I learn this is a valid question when you have several dozen other potential things you're looking at learning.

Re: Is Haskell really the language of geniuses and academia? (2019)

#34

With Haskell, one always finds articles explaining how great it is, how its features (pure functionality) lend to correct code. But, articles explaining the core use cases and how only this language enabled solving it are rare. I'd love to read someone's decision postmortem that goes something like 'Here is a problem we were looking to solve. And here is how specific features A/B/C of Haskell helped us solve it well.…

>But, articles explaining the core use cases and how only this language enabled solving it are rare From my (limited) experience with Haskell, my impression is that it's strongest in domains that map _very_ well to formal mathematical models. Mathematical computation is an obvious example, but things like programming language parsers are also really intuitive to build in Haskell. My experience trying to use Haskell f…

I'm having trouble understanding what your actual point of criticism is.

The records problem is basically a small syntactical quirk. Undesirable, yes, but not what will make or break production software development.

Lenses solve some of that and much more. Lenses strictly improve on fields/records/getters/setters/etc. in any other language you know. In other words, they accomplish what they do and then some.

If that was your only problem with Haskell, then it might be one of your favourite languages if you get to know it again.

Re: Is Haskell really the language of geniuses and academia? (2019)

#35

With Haskell, one always finds articles explaining how great it is, how its features (pure functionality) lend to correct code. But, articles explaining the core use cases and how only this language enabled solving it are rare. I'd love to read someone's decision postmortem that goes something like 'Here is a problem we were looking to solve. And here is how specific features A/B/C of Haskell helped us solve it well.…

You make a lot of awesome points. The lesson I derive from Haskell is that "If it compiles, it will work" 1. is inflated nonsense 2. has a lot less to do with Haskell-the-language than with Haskell-the-type-system I have observed a similar phenomenon with Rust. That statement is not perfect, it's hyperbole. If it compiles, it doesn't mean it will run (otherwise, why bother writing code? We just write function signatu…

Rust supports mutability that's bounded to a single program scope. That's a lot closer to functional immutability than to default-shared mutability as used in most procedural languages. Shared mutability is very clearly opt-in, and usually exceptional.

Re: Is Haskell really the language of geniuses and academia? (2019)

#36
post #33
post #8

In my experience, people who ask questions like "why should I learn about X when I don't already see its practical applications" are just not people who learn a lot of things, relatively and generally speaking. That's not a value judgment, just an observation. I don't think it takes any special ability or particular intelligence to be drawn to a language like Haskell-- All you really need is real genuine curiosity, a…

There are many things competing for people's time and attention. Why should I learn this is a valid question when you have several dozen other potential things you're looking at learning.

While that's true, in practice I have not found that people tend to spend their time learning other unfamiliar things-- rather, they often either waste their time, or spend their time learning things they are already somewhat familiar with.

There's nothing wrong with that, but going outside the comfort zone is how you maximize perspective. In other words, it's pretty much completely impossible to convince someone that it would be really worth their time to learn more maths (eg.: calculus, linear algebra, whatever)... The only way they'll see the practical value of doing so is if they actually do it.

Re: Is Haskell really the language of geniuses and academia? (2019)

#37
post #8

In my experience, people who ask questions like "why should I learn about X when I don't already see its practical applications" are just not people who learn a lot of things, relatively and generally speaking. That's not a value judgment, just an observation. I don't think it takes any special ability or particular intelligence to be drawn to a language like Haskell-- All you really need is real genuine curiosity, a…

I don't buy that observation. Asking for practicality means asking if a thing connects with the outside world and whether it spans across its own domain. Most programmers with wide skillsets and experience I know are inherently practically oriented people.

Focusing on practical things means avoiding digging yourself into an ivory tower, it's important to remember that programming languages are human artifacts and it's very easy to get lost in inventions we made up. Practicality is a measure of outwardness, not of curiosity. Many geniuses are very prone to get stuck in their own sky castles.

In fact that's funnily mirrored in Haskell itself. I/O in Haskell was only added after the fact, the language started out kind of solipsistic leading to monadic IO as a solution to the question of "wait, how do we actually talk to the outside world guys?"

Re: Is Haskell really the language of geniuses and academia? (2019)

#38

Laziness is "cool", but is it really needed? I don't know any other commonly known languages that have that as a feature. Is it needed in general, or is it needed in Haskell in particular? Same thing seems to apply to monads. Haskell programmers use them a lot but other languages seem to work just fine without them. So my guess is that many of the special features of Haskell are solutions to problems you will have if…

There are definitely scenarios where laziness is crucial. Haskell is the only mainstream language I know of where laziness is the default, but many languages offer laziness when needed. (E.g. IEnumerable interface in C#.)

Monads are essential for "effectful" programming in a functional language. Imperative languages don't need monads, because everything they do is effectful (which leads to unnecessary side effects, and from there to a plethora of errors).

Re: Is Haskell really the language of geniuses and academia? (2019)

#40
post #17

Earlier quoted context omitted.

I may get some flak for this but Haskell still being called a research language is doing Haskell a huge disservice for adoption. The new ideas of Haskell are now old and well-known in programming languages research for over a decade. Seeing Haskell as a research language causes the community, by and large, to remain in an academic-mindset. But what the Haskell community needs now is an engineering-mindset. I think Do…

I suspect that the community is overall quite happy with increased adoption being a non-goal. That is, it does not need to shift to an engineering-mindset because it does not value the consequences of that shift.

I don't think that's correct. Especially since there's a community-led organization with the specific goal of increasing adoption https://haskell.foundation/
Post reply on HN