3 ms·
Rust’s syntax is definitely complicated and that’s one of my least favorite things about it but it’s extremely consistent. What gives you the “all over the plac
by jolux 5y ago
Rust’s syntax is definitely complicated and that’s one of my least favorite things about it but it’s extremely consistent. What gives you the “all over the place” feeling?
- mrweasel 5y agoI don’t really agree that it consistent, but maybe you’re right that it just complicated. There are so many different syntaxes for all sorts of features that you can’t really hold it all in your head. It’s been a year since I last gave Rust a try, in the mean time I’ve been able to pick Go without much effort. Rust just seem like PHP, it’s fast, featurefull but not thought through.
- nindalf 5y agoYou're assuming that it was difficult to learn because the features weren't thought through. Have you considered that maybe it was because there were genuinely new concepts not present in other languages?
- stouset 5y agoYeah, if anything, Rust feels to me like it's incredibly well thought through. All the pieces fit together well precisely as if they were all thought of as a whole. It's "hard" because it forces you to consider an entirely new constraint of your programs upfront. But (almost) every piece composes nicely with every other piece in a way that makes Rust development extremely pleasant. Golang feels like the opposite, in that none of the parts are actually built to work with one another. Tuple returns exist but there are no language features that allow you to actually work with them. There's a strong type system, but you have to break out of it with interface{} and type punning to solve entire classes of common problems. Type punning exists, but go can't prove exhaustiveness of switch statements so doing this opens further gaping holes. Errors are handled explicitly everywhere, but again there are no tools to handle the repetitive lifting so every program becomes an endless series of error handling occasionally interrupted by bits of program logic. And let's not forget how badly interface pointers interact with nils: comparing a nil interface pointer against nil returns false, so a basic nil-check that works everywhere else fails to actually perform correctly when dealing with interfaces.