Skip to content

class support #2110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mictadlo opened this issue Apr 2, 2012 · 1 comment
Closed

class support #2110

mictadlo opened this issue Apr 2, 2012 · 1 comment

Comments

@mictadlo
Copy link

mictadlo commented Apr 2, 2012

Hello,
any plans to support class in DART:
class Point {
Point(this.x, this.y);
distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return Math.sqrt(dx * dx + dy * dy);
}
var x, y;
}

main() {
Point p = new Point(2, 3);
Point q = new Point(3, 4);
print('distance from p to q = ${p.distanceTo(q)}');
}

@nikomatsakis
Copy link
Contributor

Our plans regarding classes are described in #1726

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants