News for hackers. Stuff that matters.
Re:Python 3.11 vs 3.10 performance by CobrastanJorji on Wednesday July 06, 2022 @02:42PM (#32005086)
I've been learning Rust recently. There are a number of things about the language that I dislike, but its error messages are an absolute joy. They clearly put an incredible amount of effort into them, and it really shows.
Re:Python 3.11 vs 3.10 performance by jmcgough on Wednesday July 06, 2022 @04:23PM (#32006339)
I wrote 2-3 of those and I really wish more languages had a similar approach with their standard library.

When you get an error there's a verbose explanation you can ask for, which describes the problem, gives example code and suggests how you can fix it. The language has a longer ramp-up period because it contains new paradigms, so little touches like this help a lot in onboarding new devs.

Re:Python 3.11 vs 3.10 performance by HdS84 on Thursday July 07, 2022 @12:57PM (#32016441)
I am a hug fan of ravendb's founder ayende. He always stresses how useful good error messages are, especially for self service. And he is certainly on spot with that, e.g "could not execute Mode None" is much less helpful than " environment variable X not set, could not determine Mode. Please set this as MODE=Agressive or MODE=Passive".
Re:Python 3.11 vs 3.10 performance by dralley on Wednesday July 06, 2022 @06:06PM (#32007422)
The exception is std::io::Error, which doesn't provide any information about which file failed to be opened/closed/read/whatever. I know this is because doing so would require an allocation, but it's still painful.
Re:Python 3.11 vs 3.10 performance by tialaramex on Wednesday July 06, 2022 @06:46PM (#32007853)
Your parent is thinking about the compiler errors, whereas std::io::Error (which I'm guessing you mean) is an Error type your software can get from calling I/O functions at runtime.

To be fair, if decorating the error with information about a filename is what you needed, since Rust's Error types are just types nothing stops you making your function's Error type be the tuple (std::io::Error, &str) if you have a string reference, or (though this seems terribly inappropriate in production code) leaking a Box to make a static reference from a string whose lifetime isn't sufficient.

Re:Python 3.11 vs 3.10 performance by estebank on Wednesday July 06, 2022 @06:40PM (#32007792)
The GP comment is referring to the compile time diagnostics and not the runtime diagnostics, which certainly could do with some out-of-the-box improvements but that you can extend in your own code (as opposed to compile errors which crate authors have little control over, at least for now).
Re:Python 3.11 vs 3.10 performance by rowanG077 on Wednesday July 06, 2022 @06:40PM (#32007797)
huh a stack trace should tell you that.