Let's save that backward compatibility-killing feature for some other thread.
Yeah, but... if you squint at it from the other direction:
- named parameters, implemented "correctly" (?) encompass default parameters, so why not kill two birds with the one stone?
- they're only backward-incompatible if you start using the feature (in a Sub invocation) before they're implemented (in the Sub)
All five of these related features: variable number of parameters, default parameters, named parameters, variable parameter types, and variable number of return values, are pretty easy to do with Arrays and Maps of Objects, and more flexibly to boot (admittedly more wordily too). Especially now with ".As(Type)" and "GetType()" additions to B4X joining "Is Type".
And User-Defined Types have always gotten us half-way there anyway, if you don't need the "variable number of" aspect.
The main advantage I can see of Erel building it into the compiler is that static cases can be more efficient, eg having a single Bit.And function that works correspondingly with Byte/Short/Int/Long according to the parameter type(s).
I'm not even sure why I've written so much in this thread. Whatever Erel decides is the most effective use of time and energy, I'll be happy with. Overall seems like an approximately 50:50 decision to me. But then again, I'm a bit of a stick in the mud, eg, still doubtful about whether Smart String Literals and Designer Scripts were actually Great Leap Forwards, or just redundant alternative ways of doing things we were already comfortably doing.