3 ms·
Is that one line more verbose than adding multiple lines of passing information through all the functions to provide all the same features? Probably not clear,
by FrustratedMonky 3y ago
Is that one line more verbose than adding multiple lines of passing information through all the functions to provide all the same features?
Probably not clear, but all of those functions are doing something that is helpful in additional checks. As others pointed out, you can set a pointer if you like in a simple line, but that isn't safe.
The verbosity is providing the features, at least it is on one line, instead of 20 or 100 lines.
- capableweb 3y agoOf course the verbosity is doing something, the same is true for Java as well, it's not like the verbosity is just useless characters doing nothing. Still makes it overly verbose for a lot of us. I still write Rust code daily, but I wish the language thought a bit more about read/write ergonomics.
- oneshtein 3y agoIt's API, not a language. Write your own, ergonomic and safe API on top of unsafe code.
- capableweb 3y agoDon't act like this verbosity isn't widespread in the Rust ecosystem already.
- oneshtein 3y agoI'm a professional software developer. In my experience, Rust code is shorter than equivalent C or C++ code, with proper error handling, no memory leaks, no race conditions. If you rewrite the code above in a proper C, you will have a page of code at least.