3 ms·
fugly syntax is one of the biggest reasons i will never touch rust. zig is not far too off, unfortunately. i i needed non-gc language, i would go for odin. not
by indulona 2y ago
fugly syntax is one of the biggest reasons i will never touch rust. zig is not far too off, unfortunately. i i needed non-gc language, i would go for odin. not perfect but closes to usable. it's just too hard to do anything but Go, once you get comfortable with it. they got too many things right to see grass being greener elsewhere.
- IshKebab 2y agoRust encodes far more information into source code than most languages, so it simply needs more syntax. I wouldn't say it's ugly (except macros, not sure what they were thinking there), there's just more of it. Obviously if you remove lifetimes, types, references, etc. you're going to need less syntax.
- indulona 2y agojust because there are more keywords/syntax, it does not necessarily mean it has to be ugly. they could have made better decisions when designing the language.
- bmacho 2y ago> Rust encodes far more information into source code than most languages, so it simply needs more syntax. I don't think this is the case. Firstly, all the necessary data can be encoded by keywords, spaces and newlines. Forth or TCL can encode everything Rust can (since their interpreters are 100% configurable), only with keywords, and spaces between. A language should have special syntax for only the important part, not for everything. Secondly, even though Rust has special syntax for a lot of stuff, it could be nicer to the eye. For example, RattleSnake here https://matklad.github.io/2023/01/26/rusts-ugly-syntax.html https://matklad.github.io/2023/01/26/rusts-ugly-syntax.html or "Haskell flavored Rust" here https://news.ycombinator.com/item?id=34541695#34543124 https://news.ycombinator.com/item?id=34541695#34543124 are much nicer to the eye. But if you need a bunch of stuff that may or may not apply to a function or type definition for example, then why not just use CSS/Rebol style syntax, and put all your keywords that apply in a row. No need for all the weird symbols, brackets, colons and all that. You could even use keyword=no, and be extra explicit.
- IshKebab 2y agoDid you actually read that Rattlesnake post? It's making exactly the same point I was. Also IMO the Rattlesnake example looks awful. The Haskell flavoured Rust is even worse. Do you seriously prefer those? If so I'm afraid your sense of taste is a bit suss.