News for hackers. Stuff that matters.
Re:I would like a job writing Haskell by benreesman on Tuesday February 08, 2022 @08:39AM (#30258207)
Yeah I have no particular axe to grind on Haskell’s behalf. I’m a Lisp guy who has to write C++ all day like everyone else.

Lazy is a ridiculous default, the combinatorial explosion created by GHC extensions makes C compiler quirks look like a gentle massage in comparison, and building Haskell is a friggin migraine on wheels.

But for whatever reason, those folks are on average in my experience, serious as a heart attack.

Re:I would like a job writing Haskell by eru on Tuesday February 08, 2022 @09:20AM (#30258654)
Lazy made historical sense as a default: it forced them to deal with side-effects properly.

For a new language I would suggest that without annotation, only pure, total functions are allowed.

Haskell makes you annotate side-effecting functions with a tag (like IO). But it allows divergent and partial functions just fine. That's why they can't just remove the laziness.

I propose that the latter would also need a tag.

The nice thing about total functions is that the choice between evaluation orders becomes purely a matter of optimization, and won't change anything about semantics.

Some languages like Agda already do something a bit like this.

(Also note that total functions are not Turing complete. But that's a feature, not a bug.)

Re:I would like a job writing Haskell by ineedasername on Tuesday February 08, 2022 @08:44AM (#30258251)
I'll take your word for it then, since I have seen similar opinions expressed before, but when you say "serious" what particular qualities are you thinking about?
Re:I would like a job writing Haskell by benreesman on Tuesday February 08, 2022 @08:59AM (#30258409)
See a problem, realize it’s a graph, realize it’s traveling salesman, reduce it to 3SAT, and start grinding it out in MiniSAT before I can type “jupyter lab”.
Re:I would like a job writing Haskell by eru on Tuesday February 08, 2022 @09:22AM (#30258678)
That's not particularly Haskell specific.

What's more Haskell specific is recognizing many problems can be solved easier when seen through the lens of parsers, interpreters and/or compilers.

Haskell's and the whole ML family of languages are great at writing parsers etc. In fact they were originally invented for implementing other languages.

Re:I would like a job writing Haskell by CactusOnFire on Tuesday February 08, 2022 @10:40AM (#30259694)
I have always figured the appeal of Haskell, Clojure, et al., is to transpile your task and turn any software problem into your language of choice.
Re:I would like a job writing Haskell by eru on Tuesday February 08, 2022 @09:18PM (#30267854)
Yes, though that's related, but not really want I wanted to say.

I meant that solving a problem in Haskell can often mean eg writing something a bit like a parser.

Re:I would like a job writing Haskell by beanjuiceII on Tuesday February 08, 2022 @11:10AM (#30260150)
ever check this out? https://github.com/Kindelia/HVM