Large compiler refactoring

Excellent news @Erel , thank you...
 
Optional as needed on definition, not needed on call?
 
Optional as needed on definition, not needed on call?
Yes.

naughty question: will CallSub and CallSubDelayed also be able to call Subs that have optional parameters?
No. Optional parameters are set during compilation so dynamic calls must include all parameters.
 
does this also means that it will be possible to call "Initialize" on a generic "Object" by using CallSub without knowing it's actual Class?
 
At last we can get rid of the unused "job name" parameter (it was important before the Wait For feature was implemented):
Code: Copy
Dim j As HttpJob
j.Initialize 'instead of j.Initialize("", Me)
j.Download(url)

Code: Copy
Public Sub Initialize (Name As String = "", TargetModule As Object = Me)
 
Code: Copy
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" parameter
"Me" will be set to the calling object not the object containing the Initialize sub.
is it a special case or it will be applied to all parameters?
 
The default values are set during compilation, not runtime.


"Me" will be set to the calling object not the object containing the Initialize sub.
True.

is it a special case or it will be applied to all parameters?
It is not a special case, though I assume that most default values will be of constant values.
 
Back
Top