Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
11–20 of 60 posts
Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#12The problem with standardization is that you iron out all of the innovations. Certain language constructs are simply better for certain tasks. Lisp is built for recursion so it's great with lists. Object-oriented languages in theory are great for modularity and maintainability. Granted all these aspects have a lot to do with the coder in addition to the language. If all languages required you to manage memory as in C…
Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#13Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#14Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#15Because syntax is one of the features of a language.
...and if you have the same syntax for all languages then what is the difference? All languages would just be extensions of the same basic language if the syntax is the same.
It is a good question though. Why have more than 3 or 4 programming languages at all?
Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#16Earlier quoted context omitted.
Same syntax, different semantics.. that does not sound easier to me. At all. Also, why don't we all just use one operating system for everything, have one kind of coffee, and eat one perfectly balanced meal all the time?
It seems you're disagreeing with a statement I never made. The question was "If they did have the same syntax, would they be different languages?" I replied: "Yes, they would be different because their semantics would be different" I never said it would be a good thing. And by stretching your analogy to the territory of food it only becomes weaker (with food diversity is a goal by itself). Also it can be argued that…
I wanted to a) show how "one true syntax" would in itself be challenging and b) explain the utility that diversity has by analogy.
I agree that for most tasks, using a POSIX compliant unix-like system will suffice, but that's as much ground as I'm willing to concede on that point (for now ;)
Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#17Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#18This question can not be fully answered in prose. It can only be answered with a challenge: Learn four or five diverse languages reasonably well, then try to create the single syntax that works well for all of them. You'll understand when you're done... or perhaps rather, when you find you'll never be done. I will give one example of the tens upon tens of issues you will encounter: What's the one true syntax for a ty…
Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?
#19It's because some people don't like s-expressions, so they've been making up a bunch of other stuff.
Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer,
and people who suck at programming are left out.