Skip to content
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

Add syntactic sugar "class" #328

Open
sychoo opened this issue Jun 9, 2019 · 1 comment
Open

Add syntactic sugar "class" #328

sychoo opened this issue Jun 9, 2019 · 1 comment

Comments

@sychoo
Copy link
Contributor

sychoo commented Jun 9, 2019

The "class" declaration will combine object type declaration and object implementation.

i.e.
type IntList
def sum():Int
val empty:IntList = new
def sum():Int = 0

is equivalent to
class empty:IntList = new
def sum():Int = 0

@JonathanAldrich
Copy link
Member

One potential design for this is outlined in this paper: http://www.cs.cmu.edu/~aldrich/papers/maspeghi13.pdf

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

No branches or pull requests

2 participants