1,167 karma · joined February 6, 2011
[1]: http://integer32.com/ [2]: https://www.manning.com/livevideo/rust-in-motion?a_aid=jgoulding&a_bid=6a993c2e
diff --git a/src/exec.c b/src/exec.C
I don’t think git existed in 1975 ;-)I’ll assume that you are in on the joke and I am not, however!
Perhaps, but if we had come up with a new word, you or someone else would complain that we had done that instead of using a word that people already "understood". :-)
English is a language full of elision, and there's nothing inherently wrong with using one word for closely related meanings. When being precise, Rust uses the term "memory unsafety", but we humans usually shorten that to just "unsafety" because we are lazy.
My point was merely to state that a function throwing an exception [1] doesn't introduce memory unsafety.
---
[1] Notably, we call this "panicking" in Rust-speak; does the fact that we call it something different from "exceptions" confuse people? Probably at least one.
Can you expand a bit on how you do this internationalization? I've got a low-priority issue [1] to investigate how to integrate SNAFU and Fluent to get i18n for error messages, but knowing how someone does it today would be super helpful!
I can't add much to the Haskell part as I've only ever used it sparingly. In many aspects, I view Rust as only having one or two small things that are new (or at least new in a non-research programming language). Its big strength is combining a lot of existing good ideas in a principled manner.
- https://rust-lang.zulipchat.com/#narrow/stream/189540-t-comp...
It's coming, but it's still unstable and being actively developed
Do you have any hypotheses about why we don't see as much publicity for Haskell then?
https://insights.stackoverflow.com/survey/2019?__hstc=188987...
Some errors are admittedly worse, and people like estebank are actively working on improving them.
https://www.youtube.com/watch?v=CuD7SCqHB7k
Midori and Rust have several striking similarities, and Microsoft's recent uptick in interest in Rust (and Rust-like languages) bodes well for improved software quality.
Creating an allocator is inherently possible. Using that allocator with the rest of the ecosystem is currently not stable, as you point out.
As a sometimes Rust embedded developer, I look forward to both parameterized allocators and fallible allocation.
One example:
That is the point of most of the libraries described in the article — to prevent having to recreate this particular wheel each time you need it. Do all Rust programs/libraries need one of the libraries? Not at all, but I find that using one that has some nice bells and whistles will encourage the programmer to improve the errors and their messages.
SNAFU addresses this by allowing `Option<Backtrace>` in the error struct. The backtrace is only captured when an environment variable is set by the end user.
That's generally the purpose of the libraries outlined in the article — reducing the pain of creating the custom error types.
Crates like my SNAFU (https://docs.rs/snafu/0.6.0/snafu/) help abstract this away. Whenever the standard library implementation stabilizes, you will likely see many more errors including backtraces.
Taken to the extreme, you have a unique context for every possible error source inside your library, which means you could directly search for the name to find the line number.
This does make me wonder how I could add line / file information to an error automatically though.