Live data from Hacker News

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

habr.com

41–50 of 83 posts

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

#41

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.

Articles of that form are usually BS though, for any language. These are general purpose programming languages. They all have different benefits and drawbacks, but you can usually use any of them to do anything you want.

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

#42

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…

The common argument goes that "laziness is not the best choice for all problems, but defaulting to it forces you to make some hard decisions (referential transparency, immutability, controlled effects, control structures as first-class citizens) that are beneficial for a large class of problems."

In other words, you don't necessarily want laziness for its own sake (though sometimes you do) but you do want it for its second order benefits.

Could you get those benefits without laziness? Yes, you could. But in the history of programming languages that has happened very rarely, because under strictness it is very easy and tempting to sneak in a little mutability or uncontrolled effects. Under laziness you can't get away with that.

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

#43
post #23

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.…

> The result is its widespread adoption in its niche And everywhere else, unfortunately. Go is an overreaction in the opposite direction. In 2010 I can't agree that there is a good reason to make a language without generics and reasonable error handling from the very start.

Seems like a lot of people disagreed, because Go is definitely a “successful” language.

Kind of getting sick of hearing these same complaints, over and over, to be honest.

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

#44

I’ve found this explanation to be useful and easy: Haskell is the Mercedes of programming languages. It has features you didn’t know you wanted or needed and eventually other languages will get there, and Haskell will seem average/harder to differentiate. I’ve written a more practical post on why Haskell is worth using[0], excuse the clickbait title. [0]: https://vadosware.io/post/how-and-why-haskell-is-better/

There’s a reason Toyotas sell like hotcakes. It gets you from A-to-B reliably.

You're right, and that's why I like my analogy -- Toyotas get you there, but they got you there a lot more dangerously before airbags or ABS were invented (Mercedes innovated those things).

You don't need a Mercedes these days, and that's a result of other companies adopting things that and increase safety, etc. We should expect this of a healthy ecosystem!

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

#45
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'…

The essence of my comment was meant to emphasize that going outside one's comfort zone very often requires some leap of faith.

I'm not advocating learning only one thing and spending your life on that-- on the contrary, I'm saying if there's a subject you're not interested in (eg.: chemistry, accounting, actuarial science, invertebrate biology, whatever), it's probably because you don't know enough about it.

The people who do know about topic X, do see its applications. There's almost always more to gain from learning a different thing than we tend to believe at the onset.

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

#46
post #40
post #17

Earlier quoted context omitted.

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/

I think there are many different people with different opinions in the community.

The inofficial motto of 'avoid "success at all costs"' is not a joke. It's easy-ish to achieve success if you allow yourself to pander to the masses who don't always understand what they are missing, and there's always been an element in the Haskell community that tries to do what's right, notwithstanding what the large masses think.

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

#47

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…

Other languages have monads too. They just don't call them that, and give each individual monad's bind operation its own name instead of having a single interface they all share. For example, std::optional in C++ is a monad, with and_then being the monadic bind operation, arrays in JavaScript are monads, with flatMap being the monadic bind operation, and async functions are monads, with await being the monadic bind operation.

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

#48
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…

A good principle to abide by in software is that if the majority of people are complaining about something being too difficult to use, it is probably too difficult to use. Someone who uses it every day and is heavily invested in the software is unlikely to (want to) understand this, but that doesn't make it less true. I could write an essay about everything wrong with Haskell but the fact of the matter is the community driving it fails to see the forest for the trees.

The principles driving Haskell and functional language paradigms are fine by developers and they don't need to learn it either, nearly every developer is familiar with these. Case and point: the success of Elixir, Swift, Scala, etc.

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

#49
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…

> Do either of these problems manifest in Haskell?

Haskell code varies a ton. Some people write simple, straightforward stuff in Haskell with lots of pure functions and relatively simple types, straightforward definitions. Some people invent complicated type systems for their app. Some use weird styles, like points free, or continuation passing. Some will rely heavily on abstractions like monads, applicative functors, arrows, zippers, lenses, unfolding, etc. Some write straight imperative code.

Highly variable.

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

#50

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, a…

I believe clojure has laziness out of the box as well.

While both languages are functional, in contrast to Haskell, clojure doesn't have functors or monads. My understanding is that the same problem is essentially solved in a different way with macros.

Post reply on HN