3 ms·
In some languages like perl, there's a named parameter form that's becoming more common. If I were to rewrite the example in perl, it would look like this: e
by teek 14y ago
In some languages like perl, there's a named parameter form that's becoming more common. If I were to rewrite the example in perl, it would look like this:
ellipse(x=>60, y=>50, height=>50, width=>100);
Yes, it is more typing, but you don't need fancy auto-complete to give you hints when reading.
There's also nothing from stopping us from making a "training wheels" interface in javascript:
draw-ellipse({x:60, y:50, height:50, width:100});
function draw-ellipse(o) {
ellipse(o.x, o.y, o.height, o.width);
}