Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by StreamBright on Sunday June 16, 2019 @05:21AM
(#20194650)
Not at all. Several languages Rust included takes understandable errors seriously. I am a Rust newbie but the errors are extremely easy to grasp and fix my code.
[ Parent
| on HN ]
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by dymk on Sunday June 16, 2019 @05:44AM
(#20194703)
You say "not at all", but only cite Rust (which I didn't mention). C++ has horiffic error messages, certainly at the level of a bad Haskell error message.
I'd say my point stands pretty well.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by oblio on Sunday June 16, 2019 @08:01AM
(#20195065)
So your defense for Haskell's error messages is that they're slightly better than what you get from a massively entrenched language with famously user hostile error messages?
Good luck with that :)
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by liquidify on Sunday June 16, 2019 @08:59AM
(#20195238)
I don't think C++ errors are bad any more. 2019 compilers generally produce very good error messages. The situations where you get into pages of template nonsense in an error are becoming fewer and further between all the time.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by fmap on Sunday June 16, 2019 @01:34PM
(#20196752)
C++ has bad error messages because of language design. Contemporary C++ compilers are very good at reporting clear error messages about common mistakes, but template heavy code still yields arcane error messages. Templates are untyped, so there is no way to give sensible error messages when defining or instantiating a template. Instead you have to typecheck after template expansion, at which point you are left with an error message about compiler generated code.
There are some proposals which address this (e.g., concepts), but none of them are part of the language standard yet. Concepts in particular made it into the C++20 draft, but they also made it into a draft of the C++17 standard and were ultimately rejected. Somewhat vexingly C++ concepts actually come with the same problems only at the level of concepts instead of at the level of templates.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by Avamander on Sunday June 16, 2019 @08:00AM
(#20195059)
Some C++ has horrific messages, new compilers do a much better job at complaining about most errors - some even suggest fixes. I don't remember seeing Haskell doing that.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by agentultra on Sunday June 16, 2019 @11:03AM
(#20195794)
Haskell does do that. It provides suggestions and alternatives: you probably meant X or you forgot an import to Y or try enabling the Z extension.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,...
by StreamBright on Sunday June 16, 2019 @09:25AM
(#20195321)
You are predicating something on your experience with C++. I am saying it does not apply to other languages.