Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From the PDF:

Rust is a curly-brace, block-structured statement language. It visually resembles the C language family, but differs significantly in syntactic and semantic details.

I'm not a programming language buff, but why curly-braces and C-style still in 2010?



There are basically three choices:

1) space significant (Python, Esterel) 2) braces or other one character delimiters 3) begin/end or other word delimiters

I find 3) very noisy and while I like 1) (even though I dislike Python), I find that 2) is a pretty good compromise, one where I don't find myself having to visually parse classes ending in "end end end end end".


Within (1) there are options, as presented by Haskell (the offside rule) and Haml (you must indent exactly to _here_, no more, no less). The latter is nuts ("significant dementation", one might say. :) ).

Plus some languages, such as Haskell, allow for both braces and significant indentation, with the language culture encouraging responsible usage.


What exactly is about curly braces that implies outdatedness? Because some other old languages use it?


Or the reverse: RPG and FORTRAN had it, so in what way is significant white space a marker of modernity?


ditto for begin/end


Well, I initially just saw it as 'just more of the same' -- and questioned why is that good? Don't know. Trying to find out. Amongst all these other improvements over other C family languages that I read, why not syntax too? Perhaps as alnayyir said above, I'm bikeshedding and shouldn't care so much... Again, I'm not well versed in programming language design, etc so my original comment (and probably this one) certainly has an amount of naïveté.


seriously.

+ is sooooooooooo 1600s, we should restandardize with ʮ for addition so that + strictly applies to string concatenation...


Most familiar to the largest number of people, easy to parse, only people who want to complain about the color the bikeshed instead of the semantics of the language will care.

--- professional Python coder

(P.S. I like significant whitespace, but I also really don't care.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: