Android Question Conditional and unconditional jumps in B4X

DOM85

Active Member
Licensed User
Longtime User
Hello,
All processors have conditional and unconditional branch instructions (Je, Jne, Jl, Jmp, ...), and operating systems use them a lot.
"Loops, Do..." are a programming tool, conditional and unconditional branches too.
Often, loops require a lot of flags to exit, when a simple Goto or jump would simplify both processing and understanding during maintenance.

Is implementing these instructions on B4X at least inside a Sub function really too difficult?

Thank you.
 

QSerg

Member
@QSerg

You have used the word 'ugly' to describe code at least 8 times and 'fast' many times.
I can repeat it more times if necessarily. In short:

1. Wiki does not have any credibility for me.
2. Any language excel only in certain circumstances. There is no "the best" language. Java has it's place under Sun (pun intended), but it is nowhere universal tool and it's "universalism" is severely overrated and exaggerated as well as "clarity, quality, and development time" when developing in Java - I personally found properly formatted C code by far more clear and developing in VB6 by far more rapid and with massive margin.
3. Ditto to OOP - in some places it make sense (like button on the screen) while it some there is no sense whatsoever like with string manipulation.
4. In many tasks (examples and reasoning in my other posts) Java and OOP in whole does not make any sense whatsoever.
5. The same logic applicable to GOTO - it make sense in some situation while in others it would be better to use something else. Saying that GOTO has no place in modern world is huge exaggeration. Saying that I like to add that absent of GOTO in B4A does not restrict me anyhow, but having it would improve readability, clarity and robustness of code in some situations.
6. I like B4A (heck, otherwise I would not be here) exactly because it "protects" me to certain extend from Java's ugliness.
7. Truth as always somewhere in the middle.

In short short:
Horses for courses.
 
Upvote 0

BlueVision

Well-Known Member
Licensed User
Longtime User
The functions of B4A are compromised by Google's increasingly tightened security regime since Android 10. The workarounds that have arisen under B4A since then are not an evolutionary problem of B4A, but rather an adaptation-related problem due to the changes from SDK to SDK at Google.

With B4J, the problems you mentioned above are hardly noticeable at all. If you are developing with B4X, perhaps a change of hardware platform is the way forward for you. Away from Google and the ongoing (in my opinion dubious) improvements towards Windows.
There, the ‘we-will-change-the-rules-of-the-game-again’ pressure is hardly noticeable at all. You would also have a far more powerful processor platform than on an Android device.

If that is feasible, of course. Scanning with a PC without third party hardware, for example, can be hell. It depends on your application and the hardware required. But this is where the great advantage of B4X may come into play: platform independence. You will only have to make minimal changes to the programme itself.
 
Upvote 0

QSerg

Member
The functions of B4A are compromised by Google's increasingly tightened security regime since Android 10......
My best guess that you answering my posts.

Frankly I do not really care if it is Google or Java fault - reality is that Java based program is still severely dependent on hardware used. Unless of course it is educational program where you put one number in one cell another in other and by pressing button you figure out sum of those numbers and put result in cell number 3. In reality you have to deal with different screen resolution and orientation, scanners, printers, WiFi, database access etc. So if portability not required at all because program developed for specific task on specific hardware why I have to stick to Java if I can use anything else that far more robust and allow me to achieve my goals more rapidly? Just because Wikipedia told me so?

I cannot "go away" from Google (i.e. Android) because of given hardware. If I need to do something under Windows then I still use old trusted VB6 that works flawlessly. Or even C if GUI not required (i.e. services). And I am looking forward for release of Twin Basic - they promised to compile to Android native code as well. We shell see. What I am doing (bar code printing and scanning in production environment) does not require any portability. At all. This is why I am not really fond of Java and of course YMMV.

BTW FWIW IMHO Objective C is even uglier. If I ever will be forced to go back to Apple developing I will use B4I. Not sure though if such marvel as B4A Bridge exists in B4I. I rated B4A Bridge 12 in scale of 1 to 10 and IMHO this feature alone should convince anyone to try B4A.

I think this horse been beaten to death. Twice.
 
Upvote 0
Top