Function declarations can easily be expressed as objects like the following:
ReturnType funName(parameters):
body
funName(arguments)
is translated into
class CfunName:
+ ReturnType apply(parameters):
body
CfunName funName := CfunName()
funName.apply(arguments)
In order to also allow this for local functions, local classes have to be allowed as well (see issue #1 ).
Open question: how are methods translated? --> literature review
Function declarations can easily be expressed as objects like the following:
is translated into
In order to also allow this for local functions, local classes have to be allowed as well (see issue #1 ).
Open question: how are methods translated? --> literature review