5 ms·
You clearly have more experience with Rust than I do, and maybe you set the bar for 'rigour' higher! In languages like Python, where you might run into an issu
by afandian 6y ago
You clearly have more experience with Rust than I do, and maybe you set the bar for 'rigour' higher!
In languages like Python, where you might run into an issue caused by not have implemented an arbitrary method on a callback, or Obj-C where you might have forgotten to implement a delegate, you're on your own as far as the compiler is concerned.
Yesterday my Rust code didn't compile because I was missing a bound on a type parameter on my function that I passed though into the key type of a hashmap. Rust said "hey maybe you want to add this constraint to your declarations".
Some of this you can put down to dynamc vs static. But beyond that, it's clear that the designers and contributors haven't just said "we want to make a language with great safety" but then went on to ask "what specific ergonomic challenges will this bring to users, and how do we help them" .
I don't think you could get those ergonomics from many other languages, even if you wanted, without extra static analysis.
(edit: lazy typing on a phone; in the last para I was referring to the mainstream languages like Python rather than the whole universe of languages.)
- masklinn 6y ago> I don't think you could get those ergonomics from many other languages, even if you wanted, without extra static analysis. You absolutely could. Hell, languages which are much simpler to analyse have worse error reporting, and the language which started the movement of having less shite error message is a fairly simple one: https://elm-lang.org/news/compiler-errors-for-humans https://elm-lang.org/news/compiler-errors-for-humans
- afandian 6y agoThat was a typo on my part -- I meant languages like Python, not the whole universe of languages. Of course anything is possible, I'm sure there are very good languages out there, and that Elm is one of them.