[Info-vax] VMS Cobol - GnuCOBOL

Arne Vajhøj arne at vajhoej.dk
Sun Feb 26 20:04:24 EST 2023


On 2/26/2023 7:36 PM, Simon Clubley wrote:
> On 2023-02-25, Scott Dorsey <kludge at panix.com> wrote:
>> John Dallman <jgd at cix.co.uk> wrote:
>>> In article <ttd4ta$2j12a$2 at dont-email.me>, arne at vajhoej.dk (Arne Vajhøj)
>>> wrote:
>>>> There are of course also some differences. C# got
>>>> unsafe blocks with pointers (nobody use them) ...
>>>
>>> The main thing those are useful for is calling native code. It's way
>>> easier than using JNI.
>>
>> Which of course defeats the whole purpose of having a sandbox... 

> My experience with JNI is using it on Android.
> 
> My experience with JNI also tells me that whoever designed it had better
> not hang around anyone using it in the real world. :-)

JNI is very cumbersome to use.

But it was invented at a different time.

In 1996:
- Java was very small
- there were many times more C/C++ developers than Java developers
- there were a need for something very efficient because hardware
   was way slower than today
- there was a need for a mechanism that could be implemented on
   any platform
so they decided to do the glue code in C/C++ and not in Java.

Today the world is different and choices made back then are
no longer optimal.

But I do not see the new foreign function interface having
been a realistic option back then.

Arne







More information about the Info-vax mailing list