I haven't checked the new APIs yet however it will most probably be simple to support.BTW, do B4i will be able to handle 3D Touch of the new iPhone 6s?
#IF C++
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
#END IF
C/C++ isn't really faster than Java in most cases, on the desktop. You have to spend a LOT of time optimizing C/C++ code and setting compiler flags to make it faster than Java whereas the Java optimizer will optimize even sloppily written Java/B4J code. And even when you have fully optimized C/C++ code, you can only expect about a 10% performance boost over the equivalent Java (I'm talking about on the desktop, here). Remember, Oracle's HotSpot JVM will JIT compile performance critical portions of your program to machine code, and this is after quite aggressive optimization. On Android, the overall slowness of the Dalvik Virtual Machine made native code a lot faster by comparison but ART is slowly changing that, as well.
(...)
It just doesn't seem worth Erel's time for what little gain in programmer ease there is to be had.
It would probably be not too hard to write a tool (this could be done in B4J) that could inspect an .h file and generate a .java file that had a JNI-based wrapper for the functions in the .h file. That could, at least, automate one portion of creating simple wrappers for native libraries.
I'm not convinced at all. My own experience under Windows proved me the contrary. C++ can be a lot faster. But it depends what you do and how you write it. It's the same problem under Android. As the exchange of data between the Java heap memory and the native memory is very slow, calling a C function very frequently with big chunks of data can be much slower than a pure Java solution. And a good Java code will always be better than a poorly coded C++ lib with big memory leaks. However, one day or the other, you turn to the .so libraries to get higher performance (games, codecs) or better protection (Java is decompiled easily), so that would be nice if it was possible to integrate them with B4A without a Java wrapper.C/C++ isn't really faster than Java in most cases, on the desktop. You have to spend a LOT of time optimizing C/C++ code and setting compiler flags to make it faster than Java whereas the Java optimizer will optimize even sloppily written Java/B4J code. And even when you have fully optimized C/C++ code, you can only expect about a 10% performance boost over the equivalent Java (I'm talking about on the desktop, here). Remember, Oracle's HotSpot JVM will JIT compile performance critical portions of your program to machine code, and this is after quite aggressive optimization. On Android, the overall slowness of the Dalvik Virtual Machine made native code a lot faster by comparison but ART is slowly changing that, as well.
The thing about inline C is that it could probably be done (with great effort) but, in the end, the B4X developer would still have to configure numerous different compilers for different platforms (this is true on the desktop and on Android) and perform a lot of other ancillary tasks that would make the whole enterprise little more efficient than the current method of using native code. It just doesn't seem worth Erel's time for what little gain in programmer ease there is to be had.
It would probably be not too hard to write a tool (this could be done in B4J) that could inspect an .h file and generate a .java file that had a JNI-based wrapper for the functions in the .h file. That could, at least, automate one portion of creating simple wrappers for native libraries.
I'm not convinced at all. My own experience under Windows proved me the contrary. C++ can be a lot faster. But it depends what you do and how you write it.
What do you mean? Error message at runtime? When writing code? When compiling ?* Improved error messages. It's not uncommon to get error messages that are either wildly wrong or totally uninformative. Now, this is by no means specific to B4X, but giving better errors means simpler bug fixing.
But how a developer can be productive if he/she sacrifices performance ? You're not productive when you write sluggish code, buggy code, etc. If someone has to rewrite your code some day because it is not fast or robust enough (and I know that well as rewriting bad code was my job during 2 years), then it's more money spent than doing things properly from the beginning. Sacrificing performance is not a choice. Either you don't have time to write good code, and you pay that with angry or disappointed clients, or you don't have the skill to write performant code and you'd better change for another job. However I agree on the idea that having convenient tools can offer more productivity even it's at the expense of speed. We're of course far more productive by writing B4A code than writing assembly code. I think it's what you meant.Then again, in most cases, program performance is not as important as developer performance. CPU power is cheap, developer time is expensive, so sacrificing performance but allowing the programmer to be more productive is usually the sensible trade-off.
What do you mean? Error message at runtime? When writing code? When compiling ?.
But how a developer can be productive if he/she sacrifices performance ? You're not productive when you write sluggish code, buggy code, etc. If someone has to rewrite your code some day because it is not fast or robust enough (and I know that well as rewriting bad code was my job during 2 years), then it's more money spent than doing things properly from the beginning. Sacrificing performance is not a choice. Either you don't have time to write good code, and you pay that with angry or disappointed clients, or you don't have the skill to write performant code and you'd better change for another job. However I agree on the idea that having convenient tools can offer more productivity even it's at the expense of speed. We're of course far more productive by writing B4A code than writing assembly code. It think it's what you meant.
At runtime, some error messages come from the Android API, others come from a third-party library. Erel cannot improve them. If you want a more complete error report, you can look at the unfiltered log by unchecking a box. I can't see what you're asking here.Basically, all error messages related to running/compiling. The more accurate the message is at pinpointing the problem, the easier it is to fix.
That's why I continue to use B4A.some tools allows things to be built faster
We agree.Basically, don't Always optimize for performance. When there is a need for it, sure, do what it takes to get the performance you need, but, in most cases, the limiting factor will be the guy who asks "How much will this cost?".
At runtime, some error messages come from the Android API, others come from a third-party library. Erel cannot improve them. If you want a more complete error report, you can look at the unfiltered log by unchecking a box. I can't see what you're asking here.
All details provided by the code throwing the exception and by the JVM are already given to you. All context details provided by the OS are also given to you in the unfiltered log. I can't see how Erel could know better than the author of the code the exact reason of the error. And when the exception happens in your own code, you have a debugger to locate it. Concretely, I can't see what can be done more.Good error messages can be a huge time saver. Even simple things like fleshing out a "Invalid value: null" to a "Can't assign null to integer variable MyCounter".
"F1" help would be an immense improvement for a part time programmer like me. I spend a very large part of my time searching the documentation and the forum for answers and so this would be of great benefit to me.* Improved help. If I place the caret on a method and press F1, I want to get a help page describing that method. Each argument should be described and, if need be, some sample code. Much of this already exist, so it's mostly a matter of building the context sensitive framework.
All details provided by the code throwing the exception and by the JVM are already given to you. All context details provided by the OS are also given to you in the unfiltered log. I can't see how Erel could know better than the author of the code the exact reason of the error. And when the exception happens in your own code, you have a debugger to locate it. Concretely, I can't see what can be done more.