Sep 27 meeting notes
Axel Rauschmayer
axel at rauschma.de
Fri Sep 30 12:59:37 PDT 2011
I wholeheartedly agree with not obsessing about the token count. I’m very sensitive to context in this regard: in some contexts, I don’t mind or even welcome additional tokens, in other contexts I hate them.
However, avoiding repeating the same identifier several times seems worth it to me (this kind of redundancy goes beyond dropping a token or using shorter tokens).
Java:
class Point {
public int x;
public int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
}
JavaScript:
class Point {
constructor(this.x, this.y) {
}
}
Java is even more fun if you have getters and setters for x and y.
--
Dr. Axel Rauschmayer
axel at rauschma.de
twitter.com/rauschma
home: rauschma.de
blog: 2ality.com
More information about the es-discuss
mailing list