6 ms·
They're inexcusably awful. I still don't know why it is like that. Haskell gets hard things right and easy things terribly wrong.
by LightMachine 5y ago
They're inexcusably awful. I still don't know why it is like that. Haskell gets hard things right and easy things terribly wrong.
- sfvisser 5y agoThe errors used to be somewhat better in the past, but more features have been added to the language, type system and std libs. Those features required the core parts to be slightly more expressive and generic, resulting in more abstract error messages. Not great, but I think there are definitely no easy fixes here.
- josephcsible 5y agoBut the error that this article complains about is from a compiler that's 3 years old and 4 major releases out of date, and doing the exact same thing on the latest version will give you a better error.
- gilmi 5y agoTo further elaborate, this is the error you get on the latest GHC version (9.2.1): GHCi, version 9.2.1: https://www.haskell.org/ghc/ :? for help ghci> 1 + [2, 3] <interactive>:1:1: error: * No instance for (Num [Integer]) arising from a use of `it' * In the first argument of `print', namely `it' In a stmt of an interactive GHCi command: print it
- ParetoOptimal 5y ago> The errors used to be somewhat better in the past, but more features have been added to the language, type system and std libs. The errors have improved over time in my opinion, so your comment feels like confirmation bias.
- MawKKe 5y agoGHC is like a mathematican: unable to explain mathematical jargon without resorting to more mathematical jargon
- Smaug123 5y agoTry explaining semiconductors to an Ancient Roman - they'd have exactly the same objection! You can't understand the words until you understand the objects they're describing, and you can't get that understanding just by repeatedly asking for an explanation that uses words you already know.