3 ms·
I also know many languages (which is hardly some grand accomplishment) and it’s my firm opinion that syntax MATTERS LEAST. You spend some time getting used to i
by millimeterman 6y ago
I also know many languages (which is hardly some grand accomplishment) and it’s my firm opinion that syntax MATTERS LEAST. You spend some time getting used to it and it never really bothers you again. Semantics matter most - syntax is just an interface to the important stuff.
The difference between Python, C++, Haskell, Common Lisp, Prolog, and SQL isn’t syntax. If it was, everyone would pick their favorite syntax and use it all the time. What matters is how well the semantics (and their potential performance implications) match your problem. The syntax just needs to be a decent enough interface to the semantics. Frankly, it seems to me like most of your “counterexamples” are about language semantics, not syntax.
Here’s the thing. Would I like every language to have a consistent, beautifully designed syntax backed by UX research and testing? Absolutely. But language designers have bigger fish to fry. There’s little value in wasting energy talking about syntax once it reaches a basic state of acceptability.
I do amend my statement - you’re right that it’s a big, unsubstantiated claim. There are no _demonstrated_ differences. I haven’t seen an ounce of evidence that it makes a difference beyond familiarity. Furthermore, even if it did, that wouldn’t make it top priority. It would just make arguments about it sensible.
- mamcx 6y ago> The difference between Python, C++, Haskell, Common Lisp, Prolog, and SQL isn’t syntax Ok, let's try: Do SQL without the SQL syntax. P.D: I don't think we are that in disagreement ("The syntax just needs to be a decent enough interface to the semantics"), is that the claim of "syntax don't matter" make it look is just an irrelevant aspect of the language. Can be argued how much relevant, but after years on this trade, go to the C++ community (for example) and tell them to change the syntax to lisp syntax and see how much it will succeed. Syntax is 100% tied to paradigms, idioms, and such. Is intrinsic to the language we use.
- millimeterman 6y agoIt's worth reiterating the point of my initial comment (which I admit I may not have conveyed well). I never said "syntax doesn't matter", because that's not my point. My point is that it's almost never worth arguing about. Just pick something (or accept what already exists) and move on. Language designers (and you) have more worthwhile things to do. My issue is with unproductive, endless debates about syntax minutiae like the original post. Syntax doesn't matter enough to be worth it, and such debates devolve into everyone shouting about their personal preferences anyway (see: many of these comments). > Do SQL without the SQL syntax I'm not sure what you're saying here. The syntax of SQL is completely arbitrary - I'm sure you could think of a completely different syntax that works just fine. Let me know if I'm missing something, but it seems extremely obvious to me that the biggest difference between C++ and SQL programs isn't how they look - it's how they behave. One wouldn't dream of replacing one with the other and that has nothing to do with their syntaxes. > go to the C++ community (for example) and tell them to change the syntax to lisp syntax and see how much it will succeed Obviously it'll fail - good. Even if lisp syntax was way better, they've gotten used to C++ syntax and have much more important things to spend their time on.
- ogoffart 6y ago> Ok, let's try: Do SQL without the SQL syntax. Select(`my_table`, [`column_A`, `column_B`]) .Filter(`column_C` > 53 && `column_D` == $varA) .Sort_by(`column_C`) There you go: you have the exact semantic as a traditional SQL query (1:1 mapping) and only the syntax is different. Now, one may argue that the syntax is "ugly", less familiar, that the ` are hard to type or whatever, but this is just taste. One simply get used to it. The expressiveness and semantic are the same as in SQL > Syntax is 100% tied to paradigms, idioms, and such. Is intrinsic to the language we use. I think then we don't have the same definition of syntax. The way i understand it is that the syntax is just the way to represent these idioms and paradigms visually. What the parent is saying is that these paradigms and idiom as what is important, but the exact way they are written, not as much (as long as it is within reason)
- mamcx 6y agoI was to talk about the SQL stuff, but I think it will be wasted as long we get blind to the fact syntax IS semantic. However this: > but the exact way they are written, not as much (as long as it is within reason) Then what is "within reason?". Is more logical to only have GOTO than IF, is better to have ELSEIF or nest IF?, what happened if my lang say that null is the same than Option.None?, what if generics use [] and not <>?. Whitespace matter, yes? no? Allow unicode? CamelCase, snake_case or what? What if all const are lowercase, types mixcase and the rest UPPERCASE? For some, APL syntax make more sense than algol. Talk about why, that is the point of this kind of talk. Is VERY easy to rug this kind of stuff. VERY. I WAS in that camp before. But now, I try to build my own lang (relational), and DAMM, it start to be much clear why syntax matter, even "the exact way they are written", because switch this to that and suddenly, my lang is ANOTHER paradigm (or worse, will be CONFUSED as be). Naming, is one the hard things in computer science. --- I understand why is easy to dismmis this as irrelevant. Sometimes I don't see why some people are so upset about typography and font selection, or why my profesional brother complain about framing in photograph. But go and SEE what the DESIGNERS of lang say about this stuff and you will note that for them, even this apparent less-significant thing matter. you can even get a prize on the field for show the importance of syntax (http://www.eecg.toronto.edu/~jzhu/csc326/readings/iverson.pdf http://www.eecg.toronto.edu/~jzhu/csc326/readings/iverson.pd...)! If that mean that most will not see, GREAT! That is the mark of good design.