Wish Optional .Initialize()

MarkusR

Well-Known Member
Licensed User
Longtime User
the normal syntax is
B4X:
Dim Obj As MyClass
Obj.Initialize()

but i think this part can be optional if the developer will reset/create a new object
B4X:
Obj.Initialize()

so the default code would be
B4X:
Dim Obj As MyClass

and i saw that if me using a library .Initialize() it not necessary

how about a compiler directive #AutoInitialize

my point of view, a null object make no sense and will result in trouble if you try to use it.
 
Top