The other day I found an older blog post by Rob Underwood called Code Syntax Compared. In it he wrote a very simple program in 5 different languages. He used Python, Ruby, JavaScript, PHP and Java. No .NET languages. So since I was interested I wrote samples of the same program in C# and Visual Basic. Hey why not.
The most interesting thing to me is the typing. That is to say that some of the languages that Rob used are dynamic type languages while Java, C# and Visual Basic are statically typed languages. Which is better? Well like so many things in computer science – it depends. There is a good paper (the link is to a PDF) on the topic - Static Typing Where Possible, Dynamic Typing When Needed: The End of the Cold War Between Programming Languages by Erik Meijer and Peter Drayton.
Anyway, if you are curious my samples are below: