3 ms·
I mean both languages (and programs) have modules, string interpolation, lambda syntax, and a compiler/interpreter. The only thing they really left out is Promi
by Spivak 1y ago
I mean both languages (and programs) have modules, string interpolation, lambda syntax, and a compiler/interpreter. The only thing they really left out is Promises. And you're iterating over an array so there's no understanding of iterators needed. You can write Python for a long time without ever learning about __iter__. In the example Rust program the iterator is exposed. I think if the Rust version only used the for syntax you could say you don't need to know about iterators.
- lmm 1y agoJavascript has exceptions (the article even mentions them, but seems to assume that they're somehow intuitive?) whereas Rust doesn't. And the Javascript "first-class function" syntax isn't really objectively simpler than the Rust lambda syntax, which the article seems to assume.