You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand what's the reason behind this limitation: when defining an action in java for gama, it needs to return something.
Is it because actions are supposed to have no side effect ? In this case, it is obviously not the case for many actions packaged in gama.
Is it because actions should always return some indication on its completion state (was the action executed without error is was it not possible etc.) ? In that case too, many actions packaged with gama just return true whatever happens or some kind of object that is never (and/or cannot be) used after.
Are we supposed to use something else than actions in case we don't want to return anything ? In that case again, many actions packaged with gama are returning nonsensical data and I guess they should be using that alternative instead.
Is it simply a limitation of the grammar ? I find it hard to believe that we can't define equivalents of functions with "void" return type with xtext.
That question also goes for operators even though I understand they are a different and it makes a bit more sense for them, there are still some cases where it doesn't.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I don't understand what's the reason behind this limitation: when defining an action in java for gama, it needs to return something.
Is it because actions are supposed to have no side effect ? In this case, it is obviously not the case for many actions packaged in gama.
Is it because actions should always return some indication on its completion state (was the action executed without error is was it not possible etc.) ? In that case too, many actions packaged with gama just return true whatever happens or some kind of object that is never (and/or cannot be) used after.
Are we supposed to use something else than actions in case we don't want to return anything ? In that case again, many actions packaged with gama are returning nonsensical data and I guess they should be using that alternative instead.
Is it simply a limitation of the grammar ? I find it hard to believe that we can't define equivalents of functions with "void" return type with xtext.
That question also goes for operators even though I understand they are a different and it makes a bit more sense for them, there are still some cases where it doesn't.
Beta Was this translation helpful? Give feedback.
All reactions