Classes in B4a, what can we expect.

Kimmowich

Member
Licensed User
Longtime User
Hey Erel

The next major version will include support for user classes.

This good news made me very exsited. :sign0098:

First of all I havnt worked with basic as such before I stumbled over this great product.

And since you didnt came up with any further details about what we can expect and produce from classes, I would be very interesting in what you can share so far.

sincerly
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The fine details are still not final.

Classes are an improved version of custom types. They will be similar to types with support for methods.

Class objects will also be able to handle events of their instance fields.

Inheritance is currently not planned. Duck typing will be supported with the help of CallSub keyword.

Classes will have a huge impact on the ability to write encapsulated and reusable code.
 
Upvote 0

COBRASoft

Active Member
Licensed User
Longtime User
Hey Erel,

This is great news.

I would like to add an other request. The ability to compile 'classes' to a library. I know libraries can be made in Java for specific things. But it would be handy to create some 'black boxes' or 'intelligence' in a separate library. E.g. my grid code module could be placed inside a class (or several) and be delivered to the community as a library.

What do you think, is something like that possible and achievable?

Greetings,
Sigurd
 
Upvote 0

COBRASoft

Active Member
Licensed User
Longtime User
Erel,

This is possible now too, but this doesn't make it 'black box'. I'm very interested in creating 'dll' alike libraries for B4A. I create it once, place it on 1 place on my computer and all apps I make use the same dll. With code modules or class modules, I have to copy around to different apps, which is not handy and high risk for mistakes.

Greetings,
Sigurd
 
Upvote 0

Kimmowich

Member
Licensed User
Longtime User
Thx for the heads up on classes..

Had to read up on that duck-typing..

So no base-class and no override.. (Old habits die hard) and remember to keep focus during programming :)

That dosnt ruin my excitement entirely for the this update. Just another approach of doing things.

sincerly
 
Upvote 0
Top