-
Notifications
You must be signed in to change notification settings - Fork 45
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
Possibillity of Oriented Object Programming in SARL #34
Comments
Do you suggest to add a syntax for object oriented language in SARL file? |
Yes, as we need to mix oriented object and agent programming in SARL it could be interesting to offer the possibility to create an object in sarl. |
I think a good approach will be to import the Xtend grammar and adapt it to your specific syntax (variable definition...). Currently, it is mostly in this way by extending the Xbase, which is providing the support for expressions. The question is: do we want to depend on Xtend? |
I am not sure that we should have a mixed OOP and AOP in SARL files. I rather have Xtend files for OOP and SARL for AOP. I use Xtend since its syntax is closer to SARL. What do you think? |
I think we could provide the ability to the SARL developers to define OO data structures inside the context of the SARL agent. It is similar to the definition of inner classes in this context. A typical example is the definition of the states of an agent in an enumeration type. It is not friendly to define the enumeration outside the agent in Java (or any other language). Since the states of the agents are only related to the agent, they should be accessible by other classes or agents. The inner definition in the agent may provide a solution to this small problem. |
Additionally,supporting some OO statements (I'm not sure we should support all the OO syntax; we should decide) has a couple of advantages:
A recent example of integration of OOP and AOP is Scala and its actor extension. |
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
see #34 Signed-off-by: Stéphane Galland <galland@arakhne.org>
This is just for convenience.
As JAVA and SARL languages are quite similar, it is difficult to switch between the two languages during development.
The text was updated successfully, but these errors were encountered: