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

Syntax for assignment #23

Open
BraedonWooding opened this issue Jul 4, 2018 · 0 comments
Open

Syntax for assignment #23

BraedonWooding opened this issue Jul 4, 2018 · 0 comments

Comments

@BraedonWooding
Copy link
Member

BraedonWooding commented Jul 4, 2018

Related to #8, #11

Current assignment rules dictate;

X.a = 5
// You can specify type
X.a : int = 5

However the syntax for defining a literal or a 'definition' is x : T = a which can be shortened to x := a, should we also follow suit and make assignments X.a := 5?? Or should we just automatically infer and make it just ? = ?? everywhere i.e. x = a or X.a = 5 or X = B::().

If so then what do we mean for X = B::() if X is defined vs not defined, are we assigning the label 'X' or are we assigning what X points to i.e. something more like *X = B::()?

Could we also allow X : B { ... } rather than requiring X = B::() { ... } since I don't like X = B { ... }, this would also basically help with backwards compatibility of v0.3 however we aren't ensuring that we have to be compatible just yet.

Very interesting, and I'm not settled on an answer yet.

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

No branches or pull requests

1 participant