Live data from Hacker News

Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

news.ycombinator.com

41–50 of 60 posts

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#41
post #17

It's because some people don't like s-expressions, so they've been making up a bunch of other stuff.

My theory: people who don't like s-expressions don't get programming; Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer, and people who suck at programming are left out.

I suspect that this is your hypothesis, rather than your theory.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#42

Earlier quoted context omitted.

My theory: people who don't like s-expressions don't get programming; Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer, and people who suck at programming are left out.

I know many people who are counterexamples to your theory. Languages like Perl and Python have a strong advantage in libraries. If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

The (derisive) saying used to be "You can write FORTRAN in any language" but you can also write Lisp in any language.

Not that I completely agree with the GP's point.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#44
post #26
post #3

The 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…

I don't mean to be pedantic, but the 'Java is slow' thing simply isn't true anymore. It certainly used to be slow back in the day, but it's actually pretty good these days. From what I've heard, programmers at Google put it in the same ballpark as C++. This brings me to another point.. the choice of programming language often has more to do with image and branding as opposed to actual technical merit. That's why we k…

JIT compiled languages are slow to load, because they have to compile each bit of code the first time they run it. That is why Java is known as a slow language, even though it does fine in benchmarks: because loading is the one operation that's slow enough for the user to notice.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#45
post #39

A better question is why doesn't everyone in the world speak Esparanto.

Or even, why isn't every language written using the latin alphabet? To which an answer might be, latin doesn't support certain sounds, can't represent tones... and if it did, it would break chinese language interoperability.

Analogy with human languages isn't ideal, because they have almost all grown up organically, whereas programming languages are, to a large extent, designed. The reason that every language doesn't use the Latin alphabet is, amongst others, geographic -- so many others grew up in isolation from the West, they'd never come across that alphabet before. The same isn't really true of programming languages.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#46
Because the people who designed them didn't agree on what was the best solution for the problem. And the people who use the various languages don't agree, either. Do you really think that you could sit down with a Lisp fanatic and a Java fanatic and get them to decide on a single syntax that they'd each rather use than their own favourite? They'd each prefer to do it their own way.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#47
post #25

Earlier quoted context omitted.

scheme and common lisp?

Isn't scheme a subset of common lisp (at least loosely speaking)?

For one thing, scheme has continuations, a powerful construct that Common Lisp lacks. But it's true that Common Lisp is generally more "featureful".

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#48
post #17

It's because some people don't like s-expressions, so they've been making up a bunch of other stuff.

My theory: people who don't like s-expressions don't get programming; Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer, and people who suck at programming are left out.

I'm a big fan of Lisp, but this is definitely not true. Do you think the CMUCL (a popular Common Lisp application) team who went on to make non-sexp based Dylan are just people who suck at programming? Or the functional programming community in general? Some of the members of that community who are of a certain age would have cut their teeth on Lisp, but they ended up designing/using *ML and Haskell. Or how about Alexander Stepanov, who went from Scheme to C++ and designed the STL? Or Guy Steele, who invented Scheme but went on to help design Java and Fortress? These are not stupid people.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#49

Earlier quoted context omitted.

and often times new syntax is created to support features in 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?

We have programming languages because people make them. The only way to have only 3 or 4 is to eradicate all but those and stop people from making more. However if we did that, I have a feeling we would now choose 1 or 2 that wouldn't exist if someone had done the same thing a decade ago.

A professor of mine once quipped: "What's the definition of a 'gentleman computer scientist?' Someone who knows how to make a their own computer language, but doesn't."

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#50
post #27

A better question is why doesn't everyone in the world speak Esparanto.

Because it has to complete with English which is already a world language(at least in the business world)

And Lojban is better anyway. ;-)

http://en.wikipedia.org/wiki/Lojban

http://pinstack.blogspot.com/2008/02/top-7-reasons-to-learn-...

http://www.lojban.org/tiki/tiki-index.php?page=Lojban+Introd...

Post reply on HN