4 ms·
The problem with choosing between them is, you can't switch between them within a language - either the language has pointer-support or it doesn't. You commit t
by Qwertious 10y ago
The problem with choosing between them is, you can't switch between them within a language - either the language has pointer-support or it doesn't. You commit to a language (and thus language-level features) at the start of a project and then you stick with it (unless you go polyglot or rewrite it, but whatever).
...or, the language has separate modes where you can or can't use the feature. Which is an argument for Rust's 'unsafe mode', actually. But nonetheless, the "modes" are still additional complexity compared to 'simpler' languages like C.
So, maybe the real underlying point is that Rust is cool and you should use it. Not that I would know, I haven't actually used it.
- greglindahl 10y agoFortran is an example of a language that has pointer support, and few Fortran programs need to use pointers. Contrast that with C/C++.
- gh02t 10y agoPointer use is rare in Fortran, too. I only really see it used to create views into arrays. But Fortran has a ton of features that aren't used much, e.g. the OOP stuff (which I've never seen used seriously and I'm moderately experienced with Fortran in several flavors). I'd attribute it to Fortran having become a very specialized language, with most of its users basically indifferent to a lot of the shinier new features because they just don't add much for that niche.
- fiedzia 10y agoI've been told that pointers in Fortran provide some guarantees that C does not (was it no aliasing?), and that makes big difference for compilers.
- fiedzia 10y ago> So, maybe the real underlying point is that Rust is cool and you should use it. The point would be that Rust complexity pays off, even if it is not cool to deal with it (I do love it for that, others may not).