A syntax comparison across many languages
rigaux.org
rigaux.org
There are a few other dimension to explore beside syntax. Like "are arrays 0 or 1 based?" etc
Apparently the author is now part of the opalang effort. They used to have a slightly weird syntax for their language and later changed that to have it look more like JavaScript. That's a strange move when concise syntaxes à la Ruby or CoffeeScript seem popular.
I know this because I had a colleague who was quite proud of having switched to Dvorak, and another colleague who immediately wrote a code-generation tool that emitted € characters in variable names...which are untypeable on a Dvorak keyboard. :)
http://stackoverflow.com/questions/4838507/why-does-java-all...
var f = []
f['push'](2)
// f -> [2]
Pike also has the more familiar object->method(params) syntax.It's actually a pretty useful bit of syntax. I've been using it recently when combining multiple objects deserialised from json.
var report = [name, dob]
var person = { name: 'Andrew', dob: '1980/03/23' }
_.each(report, function(prop) {
console.log(person[prop])
} var report = ['name', 'dob'];
var person = { name: 'Andrew', dob: '1980/03/23' };
report.forEach(function(prop){
console.log(person[prop]);
});In many countries like mine, both terms tend to be used interchangeably.