News for hackers. Stuff that matters.
Re:Haskell: The Bad Parts, part 2 (2020) by willtim on Tuesday February 09, 2021 @11:12AM (#26079186)
IMHO Haskell is missing three features that would really improve programming in the large:

1) better structural types. For example, polymorphic extensible records and variants. These could even be the basis for all algebraic data types. Current encodings have poor syntax and poor type inference (due to non-injective type families). The need to make all records nominal types really gets in the way when dealing with structured data. Python is the main competitor here; and so we could also just use strings and maps, but we can do better.

2) a better module system. Even Miranda had a better module system than Haskell. OOP has first-class modules.

3) a better commitment to backwards compatibility. There have been controversial and breaking changes to Haskell's standard libraries that have done more harm than good. This has likely damaged industrial adoption of Haskell. For example, my employer, a prominent Haskell sponsor, is stuck on a 7-year old version.

Unfortunately the above problems are difficult to retrofit for and so I think a new language may ultimately be needed.

Re:Haskell: The Bad Parts, part 2 (2020) by Ericson2314 on Tuesday February 09, 2021 @12:06PM (#26079882)
You realize 3 would make 1 and 2 harder or less valuable? And 3 would have also prevented a gazillion 1s and 2s from being still with us?

I think breaking changes are highly underratted and people only shy away from them because the tooling expectations in all languages are so rock bottom.

Re:Haskell: The Bad Parts, part 2 (2020) by willtim on Tuesday February 09, 2021 @12:25PM (#26080161)
> You realize 3 would make 1 and 2 harder or less valuable?

Yes that is why I think (1) and (2) need a new language.

> And 3 would have also prevented a gazillion 1s and 2s from being still with us?

I disagree. Most new features have been implemented as extensions that must be enabled with language pragmas. This is not the same thing as large breaking changes in the standard libraries.

Re:Haskell: The Bad Parts, part 2 (2020) by IngoBlechschmid on Tuesday February 09, 2021 @04:39PM (#26082686)
Isn't constructing a new language the ultimate breaking change :-)
Re:Haskell: The Bad Parts, part 2 (2020) by eyelidlessness on Tuesday February 09, 2021 @10:13PM (#26085367)
I don’t have a dog in this fight other than interest in ML-family langs generally and Haskell as a pervasive interest everywhere I go outside of Haskell. But...

No not really, if your language is intentionally designed to be a foundation for other languages. So many lisps are trivially host languages for other languages at their core. Even JS is at this point, with the widespread use of Babel and various bundlers. Those languages themselves are seldom very different underneath that.

Re:Haskell: The Bad Parts, part 2 (2020) by Ericson2314 on Wednesday February 10, 2021 @01:16PM (#26092791)
Making a "language laboratory" for typed languages, (as opposed FFI with lowest common denominators like C or so-and-so untyped, garbage-collected language) is an open problem. I think it can be solved, but until it is, it's wishful thinking to pretend a multitude of similar languages doesn't result in tragic fragmentation of a small community.
Re:Haskell: The Bad Parts, part 2 (2020) by eyelidlessness on Wednesday February 10, 2021 @10:54PM (#26098082)
TypeScript seems to be doing alright? Maybe there’s something I’m missing but TS is basically a type checker on top of everything JS compiles to, including the whole Babel universe and compiler transforms that support macros and arbitrary AST manipulation. Even its standard config offers a multitude of similar languages.
Re:Haskell: The Bad Parts, part 2 (2020) by Ericson2314 on Thursday February 11, 2021 @12:53PM (#26104802)
Having a type language on top of an untyped one is fine (except for perf). It's having multiple typed ones that compose well and aren't just reskins of the same basic type theory that's the harder part.
Re:Haskell: The Bad Parts, part 2 (2020) by matheusmoreira on Wednesday February 10, 2021 @08:42AM (#26088868)
Isn't any breaking change the same as creating a new language?

There will be two similar yet different languages in use until everyone migrates to the new version. This process could happen quickly or not at all.

Re:Haskell: The Bad Parts, part 2 (2020) by Ericson2314 on Wednesday February 10, 2021 @01:09PM (#26092710)
Yes, but there is much more likely to be tooling to migrate in the same name / same community case.
Re:Haskell: The Bad Parts, part 2 (2020) by willtim on Wednesday February 10, 2021 @02:34AM (#26086511)
Only if Haskell stops being maintained, which I very much doubt would happen. Therefore no one is forced into the change.
Re:Haskell: The Bad Parts, part 2 (2020) by Ericson2314 on Wednesday February 10, 2021 @01:13PM (#26092757)
No one is forced to upgrade to a newer version either.

Now, perhaps the problem in your eyes is the old version isn't being maintained. But I see the opposite: maintaining two versions indefinitely is the problem. The Haskell community is not infinitely big, nor growing fast enough, that if e.g. 1/2 went to Idris and 1/2 stayed, it wouldn't be catastrophic.

Making the changes we need to make, and then making it as easy as possible for everyone to migrate, I think is the best way.

Re:Haskell: The Bad Parts, part 2 (2020) by Ericson2314 on Tuesday February 09, 2021 @06:44PM (#26084080)
I wish more people would realize this!
Re:Haskell: The Bad Parts, part 2 (2020) by kthielen on Wednesday February 10, 2021 @09:45AM (#26089763)
People have made languages to address these issues (including me), and even put them in critical systems, but it is very difficult to get people to sign on to a new language.
Re:Haskell: The Bad Parts, part 2 (2020) by tikhonj on Tuesday February 09, 2021 @06:14PM (#26083801)
The practical problem is that backwards compatibility and making real improvements to the language are fundamentally at odds. There's just no way around it. If you can't break compatibility, you can't make meaningful improvements except for adding features and capabilities—and most of the problems in this article are about things that need to be taken away, not things that need to be added!
Re:Haskell: The Bad Parts, part 2 (2020) by willtim on Wednesday February 10, 2021 @11:43AM (#26091482)
I was responding to "Can Haskell evolve?", I was trying to say "I think it can, but I would prefer it to evolve in a new language". The standard library is riddled with partial functions, like head and tail. We should not take them away and break thousands of projects, research papers, books and blog articles.
Re:Haskell: The Bad Parts, part 2 (2020) by tome on Wednesday February 10, 2021 @12:12PM (#26091912)
> We should not take them away and break thousands of projects

How about the middle ground of marking them as deprecated and not to be used in new code?

Re:Haskell: The Bad Parts, part 2 (2020) by dllthomas on Monday February 22, 2021 @04:26AM (#26222435)
And I mean, they're perfectly suitable for futzing around in ghci. I think we need different preludes for different contexts.
Re:Haskell: The Bad Parts, part 2 (2020) by willtim on Wednesday February 10, 2021 @12:51PM (#26092447)
Yes, deprecation is fine, as long as they are not removed.