So what do you want to realize with B4J?
Seems an introduction is in order.
I did a BASIC and C course in the early 90s, then did most things with HyperCard. In 2003 our lab needed to do some exceedingly tedious task that would have taken us 5 days to do by hand, so I decided to write an app that could do it. As HyperCard no longer worked on our new Mac I evaluated SuperCard, LiveCode, and REALbasic on Saturday (with the expectation to go for SuperCard), decided to my surprise on REALbasic, went through a word processor tutorial on Sunday, and wrote an exceedingly simple and ugly app in an hour on Monday morning - but it did the whole work in under 5 seconds for us.
In the years that followed I taught myself to an advanced beginner / intermediate level. When REALbasic introduced the Rapid Release Model in 2007 I predicted that in the long term it would become a permanent beta quality product. Many said I was wrong, but I have a very good track record on long-term predictions. About 7 years ago more Pro developers started to complain about the increasing bugginess of REALbasic, now renamed to Xojo. Then Xojo made some exceedingly unwise decisions like renaming events and keywords (known as API 2) because "beginners don't know what append means, so we rename it to add" (I didn't know the US education system was THAT bad), making 20 years of example code, tutorials, libraries etc obsolete or unviable in the long term; Pros were told they are no longer Xojo's target group, that they are going for the beginners instead. As a result the trickle of people leaving Xojo became a flood, and with the Pros their important and VERY useful open source projects fell behind as well as most users could not maintain them, never mind upgrade them to the new API 2. B4 itself benefitted from that - I guess you all know Alain Bailleul aka AlwaysBusyCorner and his Banano and ABMaterial …
I myself had 20 years of Xojo experience, and written 61 articles and tutorials for the xDev computer magazine. A nice example of what I did can be seen in
this short tutorial about using interfaces with the Listbox (a table):
Essentially you add very different objects (eg, instances of the classes cHeader, cDepartment, cEmployee) to each rowTag, and each object knows how to paint itself in the row. Very simple and elegant to do with interfaces (in this case because they all implement the CanDrawItself interface).
Protocols (the more powerful Swift equivalent) are EVERYWHERE in Swift. For example you can have a car class cCar, a person class cPerson, a building class cBuilding, an accident class cAccident - and you can display them all on a map by having them implement the MapAnnotationProtocol and setting the features (like title, subtitle, coordinates).
The important point about interfaces / protocols is that they allow you to combine very different objects into one type based on similar behaviour or capabilities - you are not restricted to a hierarchical class structure. As stated
here:
Most modern programming languages, in the hopes of enhanced maintainability and reusability of code, offer some constructs that help the developer keep the definition of behavior and its implementation separate. Swift takes the idea of interfaces a step further with protocols. With protocols and protocol extensions, Swift allows developers to enforce elaborate conformity rules without compromising the expressiveness of the language. In this article, Toptal Software Engineer Alexander Gaidukov explores Swift protocols and how protocol-oriented programming can improve the maintainability and reusability of your code.
Anyway, I too am looking for a new programming environment. I really like Swift, but I need cross-platform. Python and Java are possible contenders (and I would think if Python had a decent IDE and compiler it would wipe the floor with pretty much anything else). Alain recommended B4, and I'm aware that B4 only implements a subset of Java's capabilities - but what, and does it implement enough?
That's where a table comparing the languages, or a high level introduction about the design philosophy and capabilities of B4 would be immensely useful.
I have to say it is somewhat sobering that most people here do not know what an interface or protocol is. And it is even more sobering that some seem to feel the need to attack the question rather than contribute useful information.
Bottom line: I still don't know if B4 implements the interface / protocol concept, but I do know that Java does.
I'm starting to think that B4 does not. And that's a pity.