Live data from Hacker News

Choosing a language based on its syntax?

gingerbill.org

101–110 of 111 posts

Re: Choosing a language based on its syntax?

#101
post #66

Hmm... I don't know how serious this wants to be taken - first example argues that syntax is interchangeable - but then the author tries to sell me his semis ??? And who even cares in the time of LLMs and auto formatting? "My hammer has this slight angle and if I hit the nail with just the right motion, it feels really good"

I was trying to be EXTREMELY clear I am talking specifically about DECLARATION syntax only and how for the most part, the concrete syntax for the DECLARTAION syntax is not that important in many languages.

However concrete syntax matters a heck of a lot and cannot be trivially interchangeable.

I had to write a follow-up article to clarify this because of people like yourself wrongly interpreting the article: https://www.gingerbill.org/article/2026/02/21/does-syntax-ma...

Re: Choosing a language based on its syntax?

#103
post #2

Language syntax is like the weather. When it's good (or when you're acclimated to it, I guess) you don't notice it. When the weather is perfect you don't even feel like the atmosphere even exists. When a language is so ingrained in your mental models, you don't even notice syntax, you just see semantics.

In the follow up article, I wrote something like this in the conclusion:

> Designing a language is more than just getting the syntax right, and denotation semantics are a lot more important in most ways, but that does not mean syntax does not matter. When you get syntax right, people won’t even know you’ve done anything at all. But when you’ve got it wrong (and have actually tried using the language), they will complain instantly.

Follow-up Article: https://www.gingerbill.org/article/2026/02/21/does-syntax-ma...

Re: Choosing a language based on its syntax?

#104

Python doesn't have automatic semicolon insertion.

Yes it does. You can even type `;` anywhere too, go an try it. Because of how good the rules are for Python's needs, most people never know that semicolons even exist in Python.

This isn't quite right. Go and JavaScript use semicolons pervasively throughout their formal grammars, and mostly don't use newlines; then, on top of that, they have special rules that allow the semicolons to be omitted in many cases depending on newline placement. Python uses newlines pervasively throughout its formal grammar, and only allows semicolons to be used in a couple specific places (at the end of a simple statement or to separate multiple simple statements on a single line).

The two systems have in common that you can either include or omit a semicolon when you've got a simple statement on its own line, but under the hood they're different; the missing semicolon at the end of a line in idiomatic Python is not "automatically inserted by the parser", it is simply not needed at all. There are also behavioral differences; for example, in Go and JavaScript a semicolon on a line by itself is legal and does nothing, while in Python it's a syntax error.

Re: Choosing a language based on its syntax?

#105

An article about diversity of language syntax that somehow only deals with C-adjacent curly-brace languages (and,tbf, Odin). This is a blinkered viewpoint. If you want to talk about syntax, at least mention the Haskell family (Elm, Idris, F*, etc), Smalltalk, and the king of syntax (less) languages, LISP (and Scheme), which teach us that syntax is a data structure.

The article does no such thing and just focused on declaration syntaxes and semicolons. I can class literally any language into the three categories for declaring variables. * Haskells are name-focused languages. * Smalltalk is a name-focused language. * LISPs are qualifier-focused languages. I think you might have a blinkered viewpoint in how you have interpreted the article.

> * Haskells are name-focused languages. * Smalltalk is a name-focused language. * LISPs are qualifier-focused languages.

First, I reject the idea that all languages can be classified according to this metric. The fact that you think that they can reveals how little experience you have with different languages.

Second, your proposed classification of these languages, even by the naive standards of the article, is wrong. You've proved my point.

Re: Choosing a language based on its syntax?

#106

Earlier quoted context omitted.

The article does no such thing and just focused on declaration syntaxes and semicolons. I can class literally any language into the three categories for declaring variables. * Haskells are name-focused languages. * Smalltalk is a name-focused language. * LISPs are qualifier-focused languages. I think you might have a blinkered viewpoint in how you have interpreted the article.

> * Haskells are name-focused languages. * Smalltalk is a name-focused language. * LISPs are qualifier-focused languages. First, I reject the idea that all languages can be classified according to this metric. The fact that you think that they can reveals how little experience you have with different languages. Second, your proposed classification of these languages, even by the naive standards of the article, is wro…

First, tell me languages which have named value declarations which don't fit into that category. I'd love for my hypothesis to be proven wrong.

Second, how are they wrong? You haven't proved any point as you were extremely vague.

Re: Choosing a language based on its syntax?

#107

Earlier quoted context omitted.

Yes it does. You can even type `;` anywhere too, go an try it. Because of how good the rules are for Python's needs, most people never know that semicolons even exist in Python.

This isn't quite right. Go and JavaScript use semicolons pervasively throughout their formal grammars, and mostly don't use newlines; then, on top of that, they have special rules that allow the semicolons to be omitted in many cases depending on newline placement. Python uses newlines pervasively throughout its formal grammar, and only allows semicolons to be used in a couple specific places (at the end of a simple…

This might might sound weird but I think that's a distinction without a difference.

Those "newline tokens" are effectively the equivalent to a semicolon in the parser. They are statement terminators. The way that Odin or Python handles them is effectively the same except when I tokenize the newlines, they are treated as semicolons but with the "text" being "\n". Thus the distinction here is a matter of what you call it, not how it is treated.

That is the same as a form of "automatic statement-terminator insertion" where that statement-terminator is whatever you want it to be. And to me, that is as form of "semicolon" (which is being used as a generalization for statement-terminator) insertion.

Re: Choosing a language based on its syntax?

#108

Earlier quoted context omitted.

> * Haskells are name-focused languages. * Smalltalk is a name-focused language. * LISPs are qualifier-focused languages. First, I reject the idea that all languages can be classified according to this metric. The fact that you think that they can reveals how little experience you have with different languages. Second, your proposed classification of these languages, even by the naive standards of the article, is wro…

First, tell me languages which have named value declarations which don't fit into that category. I'd love for my hypothesis to be proven wrong. Second, how are they wrong? You haven't proved any point as you were extremely vague.

You're missing the point. Your categories are irrelevant. It's like if I announced proudly "All cars can be divided three categories: those with rear lights angled up, those with rear lights angled down, and those with rear lights straight." True but useless.

But if you're going to categorize, your categorization is wrong. Just because a language puts a qualifier first in no way means that it is qualifier focused.

Re: Choosing a language based on its syntax?

#109

Earlier quoted context omitted.

First, tell me languages which have named value declarations which don't fit into that category. I'd love for my hypothesis to be proven wrong. Second, how are they wrong? You haven't proved any point as you were extremely vague.

You're missing the point. Your categories are irrelevant. It's like if I announced proudly "All cars can be divided three categories: those with rear lights angled up, those with rear lights angled down, and those with rear lights straight." True but useless. But if you're going to categorize, your categorization is wrong. Just because a language puts a qualifier first in no way means that it is qualifier focused .

The categorizes are useful for understand how people perceive a language. It's a human psychology category, and just because you think it is "irrelevant" misunderstands why I made the categorical distinctions in the first place.

People actually talk this way about languages, and they already have this conception.

And I've just realized what your psychological hang-up is now too, the word "focused". I originally didn't use this term when I wrote the article in 2018, but a friend suggested the term instead because it was probably a little more "neutral". I honestly cannot remember what I used before now since I have just absorbed this arbitrary term "focused", even if the distinctions are useful.

You might not think this way about languages. I know I don't when I program. But I know this is how others things, and that's the entire aspect of design. Design is just so much about understanding humans. How they function, mentally and physically. Perception, psychology, sociology, physiology, ergonomics, needs, desires, etc. It's all about being able to put yourself in other people's shoes, more than making _the thing_.

And that's what I've been trying to understand and that categorization has been helpful for understand other people. I don't care if you think the categorizes are "irrelevant" but you are not "everyone".

Re: Choosing a language based on its syntax?

#110

An article about diversity of language syntax that somehow only deals with C-adjacent curly-brace languages (and,tbf, Odin). This is a blinkered viewpoint. If you want to talk about syntax, at least mention the Haskell family (Elm, Idris, F*, etc), Smalltalk, and the king of syntax (less) languages, LISP (and Scheme), which teach us that syntax is a data structure.

The article does no such thing and just focused on declaration syntaxes and semicolons. I can class literally any language into the three categories for declaring variables. * Haskells are name-focused languages. * Smalltalk is a name-focused language. * LISPs are qualifier-focused languages. I think you might have a blinkered viewpoint in how you have interpreted the article.

I think you oversimplify things a bit.

Are those names erased during compilation? It has a massive impact.

If you have indirect calls, how are those resolved? That matters a lot.

What is even the language, after the code is compiled/interpreted. Does it disappear like in many languages? Do you have some parts available, but not all (like in PHP)? Or do you have full runtime at hand and you can mold it like in Smalltalk? There are languages with no runtime, languages with some runtime, and languages with full image in place. Each has massively different pros and cons.

When you say Haskell and Smalltalk are name focused, you are technically right, but developer experience is extremely different.

Post reply on HN