I'm interested in learning a new language.
Does anyone know of a website with the same program (maybe a Hello World) written in several different languages (maybe 10-15 or so), so that I can get an idea of how the syntaxes compare.
I'm interested in learning a new language.
Does anyone know of a website with the same program (maybe a Hello World) written in several different languages (maybe 10-15 or so), so that I can get an idea of how the syntaxes compare.
How about 1,304 languages (as of 10/6/2009)?
Not necessarily the same program written in different languages, but Wikipedia's Comparison of Programming Languages article has a good overview of the basic syntax of a lot of different languages.
Have a look at this StackOverflow question:
How do you code the “Hello World!” program in your favourite language?
If you want to look at the syntax to choose a new language to learn, I suppose that you are sensitive to that syntax.
I don"t think that looking at the Hello World example will give you a good idea of the overall syntax of the language because
If you really care about the syntax, I would recommend that you don't use the Hello World review for more than a very early filter (maybe to prioritize or reject some candidates... if really you want to do so).
I would recommand that you document yourself on languages for which syntax was part of the design concerns, or languages that are known for syntax specificities.
And then, when you are quite confident about your choice, that you dig into a few ones that are still candidates to evaluate the other aspect that will affect your development: * IDE (that could definitively compensate or help for the syntax) * Community * Available libraries * ...
Personally, I would be more interested to look for a different paradigm that a different syntax...
It would probably be more beneficial to look at various code examples rather than a simple hello world or 99 bottles of beer to compare.