5 ms·
Am I the only one that doesn't like this direction for the syntax? This was the main reason why I never got into Rust, it was just too different without any obv
by mihaic 4y ago
Am I the only one that doesn't like this direction for the syntax? This was the main reason why I never got into Rust, it was just too different without any obvious reason. It's strange that I actually enjoy working with type annotated modern Python though.
I'll now go away for a few years until the dust settles.
- xigoi 4y agoThe obvious reason is that C++ syntax is difficult to parse, for both machines and humans.
- wiseowise 4y agoWhat exactly you don’t like about it?
- mihaic 4y agoJust a lot of small things stand out: - function and variable types are harder to visually parse for me. The keyword to declare a variable and the type put the varible name in the middle for instance. - the "fn" keyword is terrible, just to save on characters. Honestly, any keyword should have vowels and is pronounceable. Python has "def", I would have been fine with "func" as well - type annotation for templatization make is hard to read where the real arguments begin (for me). I puts info on the type in another place than the variable itself. - "Mutable" feels like it should be all lowercase, to stand out. In general, I know there are areas to improve on C++ syntax, especially on modules, but some choices seem different just for the sake of difference.
- zozbot234 4y agoIt's pronounced "fun", they just didn't want to make it too explicit because coding isn't always fun.