3 ms·
Ask HN: What are the advantages of C-style synxtax?
What is better about C-style syntax versus parens? Lisp's syntax makes macros and structured editing easier, what techniques does C-syntax enable?
- cpr 17y agoYou are scratching simultaneously on the doors of a huge semi-religious war (oops, block that metaphor!) and a seriously open set of questions. (I think this has been asked zillions of times. I don't know why I feel compelled to throw in my 2 pence...) It's hard to say "better" in a multi-dimensional question like this. The things that seem clear are: * Without the absolute simplicity of the prefix-style paren-delimited Lisp syntax, true macro power is almost impossibly hard/complex/messy. * For some reason, most people find the Lisp syntax hard to internalize. (Likely due to its prefix nature.) * Progress generally happens by evolution, not revolution. (Revolutions take about 20-30 years from idea to success in the market, if the latter ever happens.) C is the granddaddy of the "worse is better" philosophy that swept the computing world about 30 years ago, and, so C-style brackets are part of the "comfort zone" that most programmers inhabit. (C++, Java, Go, etc., all stay within that zone.) I'm not sure you can say anything more before the discussion breaks down into endless rounds of fruitless bickering...
- CyberFonic 17y agoFor many people reading and/or writing C-style is easier than s-expr (Lisp). On the other-hand it is far easier to parse Lisp than C-syntax. So really depends which perspective you are considering. As a programmer you delegate the heavy lifting to the compiler and choose the language (& framework) based upon what you wish to accomplish. Perhaps you could explain your motivation for asking the question. E.g. thinking about designing yet-another-new-language?