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 encapsulation like in "classic" OOP #83

Open
AlexKirkouski opened this issue Jul 3, 2018 · 1 comment
Open

Add encapsulation like in "classic" OOP #83

AlexKirkouski opened this issue Jul 3, 2018 · 1 comment
Labels
DX Developer experience major feature Some major feature
Projects

Comments

@AlexKirkouski
Copy link
Contributor

Make it possible to write declarations inside CLASS operator. In that case, in every property reference / declaration there should be first implicit parameter this with class equal to "encapsulated" class (in case of reference if property not found - remove parameter this, and try to resolve property without it).

Also if there no parameters for property, make it possible to refer / declare this property without (). This will make such properties similar to fields / properties in classic OOP.

However, all this is just a syntax sugar, and it is not evident whether it will improve readability or make it worse.

@AlexKirkouski AlexKirkouski added the major feature Some major feature label Jul 3, 2018
@AlexKirkouski AlexKirkouski added this to the 2.0 milestone Jul 3, 2018
@AlexKirkouski AlexKirkouski removed this from the 2.0 milestone May 2, 2019
@AlexKirkouski AlexKirkouski added this to Backlog in lsfusion Jan 23, 2020
@AlexKirkouski AlexKirkouski added this to the Version 6 milestone Jan 23, 2020
@AlexKirkouski
Copy link
Contributor Author

When property / action is used in a CLASS block, then it should be treated as it has one more implicit "this" parameter of that class (as first parameter).
For example:
CLASS A {
f = DATA INTEGER (INTEGER); // converted to f = DATA INTEGER (A, INTEGER);
}

@AlexKirkouski AlexKirkouski added the DX Developer experience label Jan 25, 2020
@AlexKirkouski AlexKirkouski moved this from Backlog (version 4) to Backlog (version 6) in lsfusion Jan 27, 2020
@AlexKirkouski AlexKirkouski removed this from the Version 6 milestone Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Developer experience major feature Some major feature
Projects
lsfusion
  
Backlog (version 6)
Development

No branches or pull requests

1 participant