logoalt Hacker News

black_knightyesterday at 8:37 PM5 repliesview on HN

This is where I believe strong typing (like, Haskell-strong or stronger) and functional programming in general will be a win. The confidence I have that my fixes are localised when fixing Haskell code is infinitely stronger than fixing even Java, not speak about C, code.


Replies

deepsuntoday at 6:11 AM

You haven't mentioned the dynamic typed languages that I believe should die -- Python and Javascript. The only good use case for dynamic typing is notebooks (niche of R lang) where you're throwing out the code you just wrote after getting the result you wanted from it.

astrangeyesterday at 8:47 PM

Haskell's type system would not easily prevent this bug. It's not good at numeric/logic issues like that. When people say "Haskell makes it impossible to write bugs" they mean "Haskell has enums" (ADTs).

show 2 replies
theLiminatoryesterday at 8:47 PM

Imo, formal methods like more expressive/stricter type systems are key to making LLM generated code successful. Of course models will get better, but trusting the output will become much easier with a type system that proves more properties.

fouronnes3yesterday at 8:45 PM

What's stronger than Haskell?

show 4 replies
UltraSaneyesterday at 10:29 PM

Even Lean 4 strong typing