Closed
Description
This issue was originally filed by ervok...@gmail.com
I have an issue with the following:
class Point {
var x, y;
Point(this.x, this.y);
scale(factor) => new Point(x*factor, y*factor);
distance() => Math.sqrt(x*x + y*y);
}
The problem is that the constructor (in this case there's only one, but there may be many) includes the name of the class. This is (as far as I can tell) unnecessary duplication. Every time you rename a class, you need to change the name in multiple places.
I understand this could be solved by an IDE (which would do the work for you). However, simpler text editors have their place, too.
Please implement a different syntax, perhaps a 'new' keyword. I don't care what the exact syntax is, as long as there isn't unnecessary duplication.