- Java is the best ! - 1 Update
- You have not understood my points - 2 Updates
- Read this also about C++ - 1 Update
- Because read this... - 1 Update
- About C++... - 2 Updates
- My answer about Ada and FreePascal and C++ - 1 Update
- Read again, iccorect about C++ - 2 Updates
- I am getting crazy with C++ - 1 Update
- Here is my conclusion about C++ - 1 Update
- Please read again, i correct about C++ - 1 Update
- Read again about my objection about C++ and C - 1 Update
Ramine <ramine@1.1>: Dec 31 03:35PM -0800 Hello, Here is my JNI wrapper for FreePascal and Delphi that i have enhanced much.. It's for Java, because I have choosen Java and Java is the best ! JNI Wrapper for Delphi and FreePascal version 2.83 Authors: Jonathan Revusky, Amine Moulay Ramdane and Salvatore Meschini. Email: aminer@videotron.ca Description: This JNI Wrapper for Delphi and FreePascal provides a powerful and simplified object-oriented API for doing mixed language programming in Java and Delphi (Object Pascal language) or FreePascal. This may provide an easier and more productive way of getting Win32 and Win64 features in Java projects and integrating legacy code (at least for the Delphi or FreePascal community). Please read the readme file inside the zip file to learn more. I have noticed that JNIWapper for Delphi and FreePascal was not supporting returning of String and Arrays types from Java, so i have implemented that and i have now enhanced JNI Wrapper to be very powerful , so it's now supporting all the necessary functions and methods and and much more... hope you will happy with it cause i have worked hard to bring this new 2.83 to you, it is really now a professional software of a good quality. Also i have enhanced more JNI Wrapper and ported it to 64 bit and to both FreePascal and the Delphi XE versions, here is the functions that i have implemented and added: function JstringArrayToDTStrings(jarr : JArray) : TStrings; function JdoubleArrayToDdoubleArray(jarr : JdoubleArray) : TDdoubleArray; function JfloatArrayToDsingleArray(jarr : JFloatArray) : TDsingleArray; function JcharArrayToDwordArray(jarr : JCharArray) : TDwordArray; function JbyteArrayToDshortintArray(jarr : JByteArray) : TDshortintArray; function JshortArrayToDsmallintArray(jarr : JShortArray) : TDsmallintArray; function JbooleanArrayToDbooleanArray(jarr : JBooleanArray) : TDbooleanArray; And don't forget to call TJavaVM.freeRef() method from Delphi or FreePascal when you need to garbage collect and free the memory that was allocated. Language: FPC Pascal v2.2.0+ / Delphi XE+: http://www.freepascal.org/ Operating Systems: Windows. You can download it from: https://sites.google.com/site/aminer68/jni-wrapper-for-delphi-and-freepascal Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 03:10PM -0800 Richard Heathfield: >I realise that. >Ramine, are you aware that you are gaining a reputation for being >unteachable, illogical, and anti-social? And do you feel about that? You have not understood my points Richards Heathfield and others... What i am trying to do is to spot the right programming language that is suitable for many programming categories: such us the web, the GUI , and concurrent programming, and database programming, and Hard realtime systems etc. Now in doing so i have realized that C and C++ make the programming life more difficult, because it's difficult to do some categories of programming with it, so i have researched the web and i have also thought more, and i have discovered that Java is the best tool that simplify those requirements, you can do with it such us web programming, and GUI programming, and concurrent programming, and database programming, and Hard realtime software systems programming etc. with easy, and Java is really suitable for relatime safety critical systems... I have searched the webm and here is the tools that you have to choose for Java: Use this Java VM for hard realtime: https://www.aicas.com/cms/en/JamaicaVM Use this Java tool for concurrent programming http://www.contemplateltd.com/threadsafe/pricing And use this Java tool for formal proving of Java code: http://www.eschertech.com/products/perfect_developer.php So you have to understand me Sir and Madam that Java with those tools above makes your chance of surviving higher, and this is what's really important in my and our life.. so i have finally choosen Java and FreePascal and Delphi for programming and i have abondonned C and C++ and Ada. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 03:18PM -0800 Hello, Java have also given almost the same performance as C and C++ in the scimark benchmark, so it is really suitable for math programming also... So Java is the best ! Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 12:48PM -0800 Hello, Read this about C++ and C: Dynamic Memory Allocation in Critical Embedded Systems http://critical.eschertech.com/2010/07/30/dynamic-memory-allocation-in-critical-embedded-systems/ It`s why i think that C and C++ are not acceptable for realtime safety critical systems. Please use Java instead with this hard realtime Java VM: https://www.aicas.com/cms/en/JamaicaVM Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 11:56AM -0800 Hello, You must not to believe this Richard Heathfield of comp.programming that defend blindly C and C++ with some stupid arguments. Because read this, it`s the same that i was saying in my previous post: ``If you're performing formal verification before testing, you may argue that run-time checks are a waste of testing time. After all, they are never going to fail, right? Well, even with full formal verification, errors might occur. The compiler you are using might be generating the wrong code; or the linker might introduce an error; or the hardware itself may be faulty. Even formal verification systems have been known to contain errors. When we test formally verified software, any test failure is symptomatic of a fault in the development process, tool chain, or hardware. If we test throughly and find no errors, this gives us confidence that the process and tool chain are sound. Testing with run-time checks enabled (as well as without, if we intend to ship without run-time checks) and experiencing no run-time check failures adds to that confidence.`` Read all here please to understand me more: http://critical.eschertech.com/2010/07/07/run-time-checks-are-they-worth-it/ Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 11:13AM -0800 Hello... Sorry Richard Heathfield of comp.programming, i can not use C++ or C for realtime safety critical systems, because C++ and C have to make it both ways , the way of C++ and the way of Ada with its runtime checks. Sorry Richard Heathfield, because of the lack of those runtime checks of Ada, C++ and C have become dangerous and not suitable for realtime safety critical systems. My point is crystal clear. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 11:12AM -0800 Hello, Sorry Richard Heathfiled of comp.programming, i can not use C++ or C for realtime safety critical systems, because C++ and C have to make it both ways , the way of C++ and the way of Ada with its runtime checks. Sorry Richard Heathfield, because of the lack of those runtime checks of Ada, C++ and C have become dangerous and not suitable for realtime safety critical systems. My point is crystal clear. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 10:50AM -0800 I wrote: > values. Unlike Ada, there is no a runtime check to make sure the value > is convertible to the new type. For example, you can readily "convert" a > negative signed value to an unsigned value. And Richard Heathfield answered: -- That's perfectly true. For example: unsigned long maxval = -1; That's a good thing, not a bad thing. --- I think Richard Heathfield that your argument about C++ is stupid, because in FreePascal you have it both ways, you can have it the way of C++ if you don`t compile with the -Cr compiler option and you can have it the Ada way if you compile it with the FreePascal compiler -Cr option, the FreePascal -Cr compiler option is suitable for realtime safety critical systems where you have to constrain the system with an unsigned int and you want at runtime to catch the exception locally in the function or you want to catch the exception globally, that`s what you can do in FreePascal and Ada, but you can not do it in C and C++ , so C++ and C are not suitable for realtime safety critical systems. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 10:23AM -0800 Hello....... I think i am getting crazy with C++, because in realtime safety critical systems we must take the programming seriously... The following is true in C++: 1. C/C++ provide implicit type conversions between signed and unsigned values. Unlike Ada, there is no a runtime check to make sure the value is convertible to the new type. For example, you can readily "convert" a negative signed value to an unsigned value. Read it here: http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/ But what i don`t understand is that unsigned int is a good thing to have to constrain more the system, so how can we say that we don`t have to use signed int as say the article above... i am not convinced because if for example we have different cases in the source code of a realtime safety critical system that needs to be constrained to an unsigned int by using an unsigned int on the left of the assignement and we need also to catch this exception if at runtime we are out of this constraint and we can catch the exception with FreePascal with the compiler option -Cr, but in C++ and C we can not do it, so this is why in my opinion C++ and C are not suitable for realtime safety critical systems. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 10:27AM -0800 Read again please, i correct... Hello.. I think i am getting crazy with C++, because in realtime safety critical systems we must take the programming seriously... The following is true in C++: 1. C/C++ provide implicit type conversions between signed and unsigned values. Unlike Ada, there is no a runtime check to make sure the value is convertible to the new type. For example, you can readily "convert" a negative signed value to an unsigned value. Read it here: http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/ But what i don`t understand is that unsigned int is a good thing to have to constrain more the system, so how can we say that we don`t have to use unsigned int as say the article above... i am not convinced because if for example we have different cases in the source code of a realtime safety critical system that needs to be constrained to an unsigned int by using an unsigned int on the left of the assignement and we need also to catch this exception if at runtime we are out of this constraint and we can catch the exception with FreePascal with the compiler option -Cr, but in C++ and C we can not do it, so this is why in my opinion C++ and C are not suitable for realtime safety critical systems. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 31 10:17AM -0800 Hello, I think i am getting crazy with C++, because in realtime safety critical systems we must take the programming seriously... The following is true in C++: 1. C/C++ provide implicit type conversions between signed and unsigned values. Unlike Ada, there is no a runtime check to make sure the value is convertible to the new type. For example, you can readily "convert" a negative signed value to an unsigned value. Read it here: http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/ But what i don`t understand is that signed int is a good thing to have to constrain more the system, so how can we say that we don`t have to use unsigned int as say the article above... i am not convinced because if for example we have different cases in the source code of a realtime safety critical system that needs to be constrained to an unsigned int by using an unsigned int on the left of the assignement and we need also to catch this exception if at runtime we are out of this constraint and we can catch the exception with FreePascal with the compiler option -Cr, but in C++ and C we can not do it, so this is why in my opinion C++ and C are not suitable for realtime safety critical systems. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 30 03:00PM -0800 Hello, I think C++ is good for reatime safety critical systems, because: 1- You can enforce the strong typing of Ada by using object oriented programming. 2- And you can avoid signed or unsigned int overflow and underflow by using a secure library that uses operator overloading with the right tests inside them that catch the signed or unsigned int overflow and underflow. So the case is claused ! so i am convinced now that C++ is good for reatime safety critical systems. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 30 03:07PM -0800 Hello, I think C++ is good for realtime safety critical systems, because: 1- You can enforce the strong typing of Ada by using object oriented programming. 2- And you can avoid signed or unsigned int overflow and underflow by using a secure library that uses operator overloading with the right tests inside them that catch the signed or unsigned int overflow and underflow. So the case is closed ! so i am convinced now that C++ is good for realtime safety critical systems. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Dec 30 01:40PM -0800 Hello.... I have just took a look to operator overloading in FreePascal and Delphi, so look at how powerful it is, here is an example: === program OperatorsTest; {$APPTYPE CONSOLE} uses SysUtils; type TIntValue = record private FValue: Integer; public class operator Add(const a, b: TIntValue): TIntValue; class operator Implicit(const a: Integer): TIntValue; class operator Implicit(const a: TIntValue): Integer; property Value: Integer read FValue; end; { TIntValue } class operator TIntValue.Add(const a, b: TIntValue): TIntValue; begin Result.FValue := a.FValue + b.FValue; end; class operator TIntValue.Implicit(const a: Integer): TIntValue; begin Result.FValue := a; end; class operator TIntValue.Implicit(const a: TIntValue): Integer; begin Result := a.FValue; end; var Int: TIntValue; begin Int := 5; Int := Int + 10; WriteLn(IntToStr(Int)); end. === You can overload the following operators in both FreePascal and Delphi, read here: http://docwiki.embarcadero.com/RADStudio/Seattle/en/Operator_Overloading_(Delphi) In ADA when you define two types like this: type length is new float; type weight is new float; You can not assign type length to type weight, this strong typing of Ada you can do it easily with object oriented programming in FreePascal and Delphi and C++. So what remains about C and C++ is that in C++ and C you can not at runtime catch the exception of signed int or unsigned int overflow or underflow , this is a weakness in C++ and C , but in FreePascal and Delphi you can easily do it by compiling with the FreePasal compiler option -Co, after that you can catch the exception named EIntOverflow like this: try except on EIntOverflow do HandleIntOverflow; end; And the HandleIntOverflow you can reraise the exception by returning the name of the function that raised this exception of the signed or unsigned int overflow or underflow so that to catch the bugs easily and that's good in realtime safety critical systems, so C++ and C can not do that and this is not suitable for realtime safety critical system. Thank you, Amine Moulay Ramdane. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com. |
No comments:
Post a Comment