Why Syntax is More Important Than Semantics

By Xah Lee. Date: .
pl app and interp Shriram Krishnamurthi rt35p
[Programming Languages: Application and Interpretation By Shriram Krishnamurthi. At Buy at amazon ]

“semantics is more important than syntax”, the most idiotic pop thought.

Following is a chat session on xahlee discord, where i rant about it. Am going to edit it later, but the reasons are there.

took a quick look at amazon book preview, didn't find the quote. i'd like to find it.

semantics is more important than syntax, is something that's seemingly true.

but if you look deeper, lots of problems.

for example, let me give 2 perspectives that supports the idea syntax is more important.

one, formal languages, which is the foundation of theoretical comp sci, is all about syntax alone, by definition.

two, if one look at history of math notations, it's well known that, syntax/notations, leads the way to ideas and direction in a critical way. e.g. arabic number system vs Roman Numerals. symbolic algebra instead of english words. Matrix notation. Complex number notation.

here, you see, syntax/notation, leads the way, to even to suggest new theories and developed into entire new branch of math. While, the semantics, kinda remains same.


ok the quote might be from this book https://amzn.to/2CoKoTC

Programming Languages: Application and Interpretation: Shriram Kris...

Programming Languages: Application and Interpretation [Shriram Krishnamurthi] on Amazon.com. *FREE* shipping on qualifying offers. Programming Languages: Application and Interpretation

or maybe this one https://amzn.to/2ZZNvJT

jagen Yesterday at 10:30 PM

XahLee Yesterday at 10:31 PM

yes! that one!

thank you.

worst idiotic shit from the mouth of whoever the author

jagen Yesterday at 10:32 PM

that would be shriram

XahLee Yesterday at 10:32 PM

yeah. i remember it's him.

let me give a concrete example, syntax is more important than semantics.

let's say, we are familiar in langs, this: +

but suppose, in your lang, it's written as:

1 plus 1

where the keyword 'plus' is the operator.

(btw, javascript and many langs, has such operators, by spec. e.g js's new, or python comma, are operators.)

now, suppose the assignment operator =. Let's say in your fav lang it's written as:


where no space allowed between them.

this is a trivial example. But, you can see it's a major problem.

Now, let's say, your lang syntax is this:

assign 3 to x.

that, is a lang syntax actually very close to AppleScript and some others who tried to use English.

so, now tell me, if your lang's syntax is like that, let's say all our languages syntax are like that. To what degree, it hampers or progress computer science or the semantic part of language design?


jagen Yesterday at 10:37 PM

All four of these attributes are important to a programmer who wants to adopt a language. To a scholar,

however, one of these is profoundly significant, while the other three are of lesser importance.

he specifies it's "to a scholar"

XahLee Yesterday at 10:38 PM

the typical comp sci professor idiots who espouse that 'semantic is more important than syntax', is that, they think of it this way. 1 + 1 , and 1 plusssssss 1, are really the same. They are thinking, the important thing is that maybe the lang should also have minus, such as 1 minusssss 1, so that here the semantics is richer. Therefore, they say, semantic is more important.


jagen Yesterday at 10:38 PM

they are the same thing! except it's hard to disambiguate between identifiers and infix operators in the latter case

but that's a solved problem

XahLee Yesterday at 10:38 PM

how's the To A Scholar make a diff? A Scholar saying that, would not qualify as a scholar.

jagen Yesterday at 10:39 PM

all the difficult problems are in how do we do distributed computing with monads fak

XahLee Yesterday at 10:39 PM


Alanслав QWERTYвский Yesterday at 10:39 PM

( @XahLee I agree with this analysis of prog languages, and I think simialr ideas apply to natural language; in this sense writing is very important for informing how spoken language is used)

XahLee Yesterday at 10:39 PM

then you are not talking about language design. you are talking about comp sci.

to @jagen

jagen Yesterday at 10:41 PM

syntax is important but boring and mostly solved

XahLee Yesterday at 10:41 PM


you familar with roman numerals?

Alanслав QWERTYвский Yesterday at 10:41 PM


jagen Yesterday at 10:41 PM

what's the issue with roman numerals

aside from no encoding of zero or negatives

Alanслав QWERTYвский Yesterday at 10:42 PM

notation abstractions

engineering science

^ the things inform each other

XahLee Yesterday at 10:42 PM

ok. let me give a more sever example.

jagen Yesterday at 10:42 PM

but that's a semantic issue!

XahLee Yesterday at 10:42 PM

2k years ago, we don't have symbolic equations like today's x^2 + 3 = 5

we describe the problem, in words, often, with a story

Alanслав QWERTYвский Yesterday at 10:43 PM

@jagen when you are dealing with semantic skeletons for long enough, hearing their materialist reductionist arguments, you approach the world with the assumption that all semantics reduce to the same "substance"

XahLee Yesterday at 10:44 PM

like thus: john has a rice field, that's a square, each side is 2 unit. and, the area plus three, equals five. What's the side of John's field?

now, this is the history of math notation, am telling.

you see, so math back then, even the semantic is same as x^2 + 3 = 5, but, because we don't have that notation yet, it is extremely difficult to solve math problems, because we do not even clearly see the problem. We have to think a lot.

jagen Yesterday at 10:46 PM

yes, this is why semantics is far more important

all we need to do is construct a parser for the word problem and we can apply the same exact logic

XahLee Yesterday at 10:46 PM

eventually, after 1k years later, we begin to write, x^2 + 3 = 5, and , it gave way to the branch of math we call modern algebra, or used to be known as symbolic algebra, or even before, called theory of equations.

where we have concepts like group, ring, field.

Alanслав QWERTYвский Yesterday at 10:48 PM

(g'night big branes; :sleeping: )

XahLee Yesterday at 10:48 PM

night alan

jagen Yesterday at 10:48 PM

I am not sure that the syntax is what led to that

john's rice field can lead to abstract algebra

XahLee Yesterday at 10:50 PM

are you just arguing with me for argument sake?


jagen Yesterday at 10:50 PM


XahLee Yesterday at 10:50 PM

am talking about the history of math.

you studied history of math?

jagen Yesterday at 10:50 PM

well in this case I know I'm correct

and I need to figure out how to convince you


XahLee Yesterday at 10:51 PM

i don't think you know

you just bullshit insisting.

i am, currently teaching.

not debating. nor asking questions.

if you no want to hear it, ok.

i stop.

or, i go monolog, to myself.

jagen Yesterday at 10:52 PM

if I implemented a parser using some NLP algorithm I could translate the john problem into the same structure that x^2 + 3 = 5 has

that's why syntax is trivial to PL people

XahLee Yesterday at 10:52 PM

u don't even know what u talking about.

jagen Yesterday at 10:52 PM

you just translate it


XahLee Yesterday at 10:52 PM

completely no get the idea.

implement a parser? huh? what the fuckkkk?

who told u to implement a parser?

whyt don't u create a god machine?

jagen Yesterday at 10:52 PM

that's what you do when you write a programming language

XahLee Yesterday at 10:52 PM

and huh?? where does parser came from?

oh, i just implement a parser, and world's problem will be solved. jesus.

where does parser came from?

jagen Yesterday at 10:53 PM

your problem of superficially different syntax will be solved

XahLee Yesterday at 10:53 PM

completely no get the idea.

but bullshit thru.

and i have yet to point u to the one hundred artiles by mathematicians about the issue.

including, the designer of APL.

who says, syntax is the MOST important FUCK!

jagen Yesterday at 10:54 PM

APL people are very ideological as well

XahLee Yesterday at 10:54 PM

so, you read a few books by lisp and think all other's are idiots?

but do you have a good survey of the entire opinions?

jagen Yesterday at 10:54 PM

but you can write apl as sexprs

XahLee Yesterday at 10:54 PM

you don't even know the basic history of math notations.

jagen Yesterday at 10:54 PM


XahLee Yesterday at 10:55 PM

yeah, but then it wouldn't be APL, and would lost all properties of APL

jagen Yesterday at 10:55 PM

you don't need to know the history of everything to have an opinion on it

XahLee Yesterday at 10:55 PM

jesus. ok.

in conclusion, the chat between me and you @jagen , i think you have very little of the subject matter, but went on insisting the thoughts of the mainstream thought in Programing Languages.

for example, if lisp isn't nested paren, the lisp macro idea would hardly come up, will not be developed.

if APL is nested paren, it wouldn't develop the concept of array programing.

syntax here, played a crucial role. Not just in a language, but leads the direction of thought, into entire new branch of ideas.

there are many obvious examples.

python syntax, reduces Functional Programing style.

syntax is so important it changes programer's mind, changes your behavior, changes how you write programs.

if a for loop syntax makes you type 100 characters, and if while loop is just 10 chars, everyone would write just while loop.

that's how important syntax is. It changes programer's behavior.

also, the philosophy of math foundation: Hilbert's formalism, and also Formal Languages, which essentially ALL theoretical comp sci is based on, is nothing but syntax.

by definition.

No semantics whatsoever.


Semantics, is defined, in terms of syntax.

in a theoretical sense.


jesus, what a extreme idiotic idea that semantics is more important.

and JESUS, " i can write a parser to xyz". lol.

SEMANTICS, in modern understand of computer science and mathematics, is DEFINED, by SYNTAX.

namely, formal languages.

and for example, what is Lambda Calculus? the thing that every lisp idiots are found of?

Lambda Calculus? it's Formal Language.

What's Formal Language?

so, when i say, syntax is actually more important than semantics. WHAT, is that opinion's significance, compared to entire human animal's work on computer science?

and the answer is that: insignificant.

The reason being, such statement is not math, is not well defined, and cannot be well defined. At best, it is a wise observation, a sage's opinion, a educational lecture against popular misconceptions.

so, it has little significance with respect to humanity. In other words, i won't be recorded in annals of history or encyclopedia for such opinion.

you are seeing, how do i judge and value things, not the fucking typical hacker idiots minds on petty fuucks and don't even know it.

Now, xah's rant about syntax is more important than semantics, although, has little significance with respect to humanity because it is not really a theory, but a opinion on an philosophical issue.

but, in comparison to the entire programing field, hundred of millions of programers, or few millions of elite hacker programers, my statement, is actually better than all of theirs.

including, the joe blow professors in computer science.

That, is my opinion, an honest opinion, on where i am, what am talking about, and how i judge my values.

compared to the linux fucks, bsd fucks, lisp fucks, python fuckheads, their drivels you see daily on hackernews reddit and everywhere online.

the idea that syntax is more important than semantics, is actually not new, and is well known in math history community.

it's just that, programers, and mathematicians, are rather in diff communities that does not cross talk much. similar to, say, gamers and programers.

so for example, u see in programers idiots everybody is chalking up on how Das is the greatest keyboard, but in fact if you are a gamer, you know, tons of better and cheaper than Das.

in a similar way, in gamer community, they think Razer is such a great best thing, because they are not in keyboard nerd community proper. Else they'd know, tons of non-gaming keyboard has far better switchs, better keycaps, better build, better programability, than gamer's typical brands such as logitech, razer, cooler master, etc. such as, uhk, filco, realforce, hhkb, leopold, not to mention ergo ones such as kinesis, ergodox, xbows, truely ergo, etc.

why they dunno? cuz, their mind is not broad. they in community x, and dunno community y.

which is normal, but the problem comes, when some in community x think they know everything and insist and spread it.

so, back to the topic. i was saying, in general, mathematicians and programers are in diff worlds, do not cross talk that much.

that's why, the well-known idea how syntax drives future direction, is unheard of to ignorant coders.

now, imagine, if mathematician say, semantic is more important than notation. What do you think of that?

i mean, why not, since it is well known in programer and lang researchers that "semantics is more important". What would mathematician think?

i can tell you right off. Mathematician, would think that'd a idiotic bizzarr thought. in fact, mathematician do not think about "syntax vs semantics" at all.

mathematician look at notations, symbols, all day, and that is their main thing. Symbols.

sure, there's meaning attached, but the meaning is so attached to the notation, as if inseparatable.

you don't think about, let's switch notation, while semantics remain the same. that's not how things work.

I've given quite a few examples and philosophical reasons why syntax is more important. Let me give, another one. You know how lispers are fanatical about nested paren? To such degree, that often it is them, who claims, semantics is more important. Now, that shows how syntax is actually the most important thing to lispers. They MUST have nested parens. Else, why don't we change lisp syntax to C? Why whenever that idea is mentioned, the lispers go batshit? Because, syntax, more specifically, the nested paren syntax, is the most important thing, to lispers.

If you have a question, put $5 at patreon and message me.