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
Having several parameters which are optional will make code-generation complicated.
int add(optional int a, optional int b, optional int c)
You would need to generate several operation in a C++ generator
int add()
int add(int a, int b)
int add(int a, int b)
int add(int a, int b, int c)
This will really difficult in the templates to a) recognise and be handle accordingly.
{{ for par in operation.parameter }}
{{if par.optional }}
???
{{ endif }}
{{ endfor }}
The generator developer would be required to develop its own extension. This seems to be utterly complex. Better choice would be to have the permutations already ready in the parser, but this would require knowledge about the target language, as for example a python generator would handle these optional parameters differently.
def add(a=None, b=None, c=None):
pass
Currently I do not see a correct solution here, so this feature will not come if I am not getting enlighted :-)
An operation paraterm shall be able to be optional. This would lead in a C++ generator to an overloaded operation.
This feature shall be in the extended language profile
The text was updated successfully, but these errors were encountered: