News for hackers. Stuff that matters.
Re:I learned Haskell in just 15 years by richrichie on Monday June 17, 2024 @01:39AM (#40702624)
But why do we need Haskell for this?
Re:I learned Haskell in just 15 years by anon291 on Monday June 17, 2024 @02:02AM (#40702730)
Realistically we don't but it's very rare to meet a programmer who understands these distinctions thats not also a great functional programmer.

This is my experience after spending five years as a Haskell programmer and managing a Haskell team for several years and now moving back to the c++ world to play with AI.

I know lots of good c++ programmers working on cutting edge stuff, real experts in their field, but they sometimes still don't have a clear way to understand how to model data

That is my opinion. It's probably highly contentious.

Re:I learned Haskell in just 15 years by cornel_io on Monday June 17, 2024 @03:41AM (#40703185)
I've actually had to fire a technically exceptional Haskell programmer because of the damage they did to our C# codebase (and arguably moreso, the team). Sometimes it's not a matter of talent or skill, but culture fit.

In my experience FP-aligned people on non-FP projects tend to be more likely to overengineer, more prone to argue in favor of the Great Rewrite For No Reason Except Aesthetics, and more likely to abuse "lesser" programmers when they put up PRs. They suck as team players on teams that are not made of language nerds. I am not just talking about the one person here who I fired, this is a legit pattern I've noticed over at least a half dozen people.

Conversely, they are exactly the right people to deploy when you have really tough, self-contained problems to solve that you wouldn't trust the normal Java 9-5ers to tackle.

No matter how they do it, you can always rewrite their working code in a more maintainable language later once it's working, and make it integrate well with the rest of your stack. :D

Re:I learned Haskell in just 15 years by MrBuddyCasino on Monday June 17, 2024 @05:57AM (#40703959)
This is my experience, too. Some of the worst code I‘ve seen was a Haskell guy who first built his own (reactive?) concurrency framework and then implemented the actual functionality in completely unidiomatic and undocumented Java.

Some people don’t understand that the „best solution“ is not necessarily equal to the most beautiful abstraction they can think of.

Re:I learned Haskell in just 15 years by auggierose on Monday June 17, 2024 @08:15AM (#40704814)
> Some of the best code I‘ve seen

There, fixed it for you.

Re:I learned Haskell in just 15 years by anon291 on Monday June 17, 2024 @12:03PM (#40707110)
I mean sure. Realistically, I'm certain I would do that if I were working on a typical code base, which is why I'm in an extremely niche field where that sort of thing is valued. From my extremely biased perspective, these are the 'hard' problems that need solving, versus the general run of the mill operational things. That probably sounds pretentious, but it takes skills for both.
Re:I learned Haskell in just 15 years by freedomben on Monday June 17, 2024 @01:13PM (#40708162)
Your story matches my experience, but it always makes me think, why did this person want to work with you in the first place?

A great Haskell programmer (generally speaking) is going to be a culture misfit in any Java, C#, golang, etc shop. I know because I've been that miserable bastard who loves functional programming working with Java devs who don't know anything about FP and couldn't care less. To be clear I'm not saying you can't find a compatible Java shop (I actually did find a startup with a lot of Java devs who appreciated FP and used much of it in Java, and that was pretty great honestly), just that the odds are highly against you.

My biggest advice to people who like FP is: Find a job in a language like Clojure, Elixir, Scala, etc. There are a lot more jobs than you'd think. But if you can't, Ruby and Javascript/Typescript can be pretty close depending on where you go. Talk to existing devs and see how feel about FP in general before you join though!

Re:I learned Haskell in just 15 years by Joker_vD on Monday June 17, 2024 @06:40AM (#40704204)
Because for some reason there are no pure strict-by-default languages around.
Re:I learned Haskell in just 15 years by tome on Monday June 17, 2024 @07:21AM (#40704463)
PureScript is an example.
Re:I learned Haskell in just 15 years by foldr on Monday June 17, 2024 @06:56AM (#40704301)
Elm is one example of such. However, it's also an illustration of why these languages are rare. With a strict semantics there's an almost unbearable temptation to add library functions with side effects. Elm only avoided this fate by giving its BDFL strict control over which packages could access the JS FFI. But that upset a lot of people.
Re:I learned Haskell in just 15 years by simiones on Monday June 17, 2024 @09:01AM (#40705202)
I think Idris is the best example of a pure strict-by-default language (that also supports totality checking, I believe).
Re:I learned Haskell in just 15 years by ReleaseCandidat on Monday June 17, 2024 @10:52AM (#40706186)
> that also supports totality checking, I believe

Yes, it does. It's also dependently typed.

Re:I learned Haskell in just 15 years by ReleaseCandidat on Monday June 17, 2024 @10:50AM (#40706161)
All of them (especially newer ones) are, except Haskell (und some other, nowadays either obsolete or really obscure languages).

Idris (2), PureScript, Elm, Unison, Roc, Lean (4), Koka, Flix (and some other I've forgotten about).