Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Different languages express different ideas of how their creators think programmers should express themselves.

Since programming languages evolve this tends to cause the syntax to evolve along with the languages.

There are several languages that can be considered the great-grand-parents of pretty much all the languages still in use today.

Here is a simplified diagram:

http://rigaux.org/language-study/diagram-light.png

Every step along one of the edges solved some problems and probably created a few new ones too. The syntax was adapted to deal with the new requirements.

So that's why the syntax for different programming languages can't be the same, if it were we would essentially have only one programming language.

And if we did tomorrow morning someone would come up with a variation to improve on some issue...



There really is an arrow from Java to JavaScript? Java is like JavaScript as ham is like an hamster.


That's mostly because of a bunch of names for functions. JavaScript has more in common (syntax wise) with C than with Java.


Javascript actually feels more like it's Scheme-inspired. The object system is clearly from Self though. And the syntax is from C.


You're spot on. The wikipedia page has this to say on that subject:

"The key design principles within JavaScript are taken from the Self and Scheme programming languages."


Bernard Eich (creator of JavaScript):"The immediate concern at Netscape was it must look like Java. People have done Algol-like syntaxes for Lisp but I didn't have time to take a Scheme core so I ended up doing it all directly and that meant I could make the same mistakes that others made."

http://books.google.pl/books?id=nneBa6-mWfgC&lpg=PP1&pg=PA14...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: