Erel B4X founder Staff member Licensed User Longtime User Aug 20, 2026 #1 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...
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...
mcqueccu Expert Licensed User Longtime User Aug 21, 2026 #3 Erel said: 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... Click to expand... We can't wait....
Erel said: 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... Click to expand... We can't wait....
Daestrum Expert Licensed User Longtime User Aug 23, 2026 #8 Optional as needed on definition, not needed on call?
LucaMs Expert Licensed User Longtime User Aug 23, 2026 #9 Erel said: View attachment 173107 Click to expand... 17 What did I win? I'm really looking forward to seeing what other great new things like this there will be. A naughty question: will CallSub and CallSubDelayed also be able to call Subs that have optional parameters? Last edited: Aug 23, 2026
Erel said: View attachment 173107 Click to expand... 17 What did I win? I'm really looking forward to seeing what other great new things like this there will be. A naughty question: will CallSub and CallSubDelayed also be able to call Subs that have optional parameters?
byz Active Member Licensed User Aug 24, 2026 #10 The anticipated reform. Does it imply that the intelligent evolution of the b4x ecosystem can be controlled through parameterization.
The anticipated reform. Does it imply that the intelligent evolution of the b4x ecosystem can be controlled through parameterization.
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2026 #11 Daestrum said: Optional as needed on definition, not needed on call? Click to expand... Yes. LucaMs said: naughty question: will CallSub and CallSubDelayed also be able to call Subs that have optional parameters? Click to expand... No. Optional parameters are set during compilation so dynamic calls must include all parameters.
Daestrum said: Optional as needed on definition, not needed on call? Click to expand... Yes. LucaMs said: naughty question: will CallSub and CallSubDelayed also be able to call Subs that have optional parameters? Click to expand... No. Optional parameters are set during compilation so dynamic calls must include all parameters.
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2026 #12 Boring: Code: Copy Dim b() As Byte = "aaaa".GetBytes("UTF-8") ''' Dim s As String = BytesToString(b, 0, b.Length, "UTF-8") Not boring: Code: Copy Dim b() As Byte = "aaaa".GetBytes ''' Dim s As String = BytesToString(b)
Boring: Code: Copy Dim b() As Byte = "aaaa".GetBytes("UTF-8") ''' Dim s As String = BytesToString(b, 0, b.Length, "UTF-8") Not boring: Code: Copy Dim b() As Byte = "aaaa".GetBytes ''' Dim s As String = BytesToString(b)
Alessandro71 Well-Known Member Licensed User Longtime User Aug 24, 2026 #13 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?
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?
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2026 #14 No. It has nothing to do with it. You should create a Factory class that instantiates new objects based on some parameter. More information in a new thread.
No. It has nothing to do with it. You should create a Factory class that instantiates new objects based on some parameter. More information in a new thread.
Alexander Stolte Expert Licensed User Longtime User Aug 24, 2026 #15 Erel said: Optional parameters Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Aug 25, 2026 #16 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)
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)
Alessandro71 Well-Known Member Licensed User Longtime User Aug 25, 2026 #17 Erel said: Code: Copy Public Sub Initialize (Name As String = "", TargetModule As Object = Me) Click to expand... 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?
Erel said: Code: Copy Public Sub Initialize (Name As String = "", TargetModule As Object = Me) Click to expand... 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?
Erel B4X founder Staff member Licensed User Longtime User Aug 25, 2026 #18 The default values are set during compilation, not runtime. Alessandro71 said: "Me" will be set to the calling object not the object containing the Initialize sub. Click to expand... True. Alessandro71 said: is it a special case or it will be applied to all parameters? Click to expand... It is not a special case, though I assume that most default values will be of constant values.
The default values are set during compilation, not runtime. Alessandro71 said: "Me" will be set to the calling object not the object containing the Initialize sub. Click to expand... True. Alessandro71 said: is it a special case or it will be applied to all parameters? Click to expand... It is not a special case, though I assume that most default values will be of constant values.
Alessandro71 Well-Known Member Licensed User Longtime User Aug 25, 2026 #19 Erel said: The default values are set during compilation, not runtime. Click to expand... it stills puzzles me, since actual Me values is unknown at compile time, but i'm fully confident about your work
Erel said: The default values are set during compilation, not runtime. Click to expand... it stills puzzles me, since actual Me values is unknown at compile time, but i'm fully confident about your work
Erel B4X founder Staff member Licensed User Longtime User Aug 25, 2026 #20 Code: Copy 'class method Public Sub Example(x As Object = Me, y As Int = 4) 'calling: Object1.Example 'compiler completes it as if the code is: Object1.Example(Me, 4)
Code: Copy 'class method Public Sub Example(x As Object = Me, y As Int = 4) 'calling: Object1.Example 'compiler completes it as if the code is: Object1.Example(Me, 4)