We can't wait....Just finished a large refactoring related to the way variables and parameters are handled internally. Zero effect on B4X code behavior, but will make it easier to introduce new features. More to come...
17
Yes.Optional as needed on definition, not needed on call?
No. Optional parameters are set during compilation so dynamic calls must include all parameters.naughty question: will CallSub and CallSubDelayed also be able to call Subs that have optional parameters?
Optional parameters
Dim j As HttpJob
j.Initialize 'instead of j.Initialize("", Me)
j.Download(url)
Public Sub Initialize (Name As String = "", TargetModule As Object = Me)
so "Me" will be evaluated at run-time, not at compile time, like the "Name" parameterB4X:Public Sub Initialize (Name As String = "", TargetModule As Object = Me)
True."Me" will be set to the calling object not the object containing the Initialize sub.
It is not a special case, though I assume that most default values will be of constant values.is it a special case or it will be applied to all parameters?
it stills puzzles me, since actual Me values is unknown at compile time, but i'm fully confident about your workThe default values are set during compilation, not runtime.