.. Anti-IF campaign website .. Se non ci avete mai pensato, volevo farvi riflettere sul fatto che l'utilizzo indiscriminato, magari a cascata, di IF/FOR/SWITCH nel nostro codice c++/java è spesso un indice qualitativo che il codice così prodotto non è object-oriented! Semplicemente stiamo utilizzando un linguaggio o-o per produrre codice imperativo. Ciò ha un'influenza immediata sulla qualità del codice: leggibilità , manutenibilità e testabilità sono direttamente impattati, e noi abbiamo un riscontro pratico reale, dato dai risultati, eufemisticamente "molto migliorabili", dei report di GCOV, EMMA e LogiScope. Dato che credo interessi, sull'argomento cercheremo di organizzare un prossimo breve seminario di MoreCPP, sul quale vi aggiornerò prossimamente. Buon lavoro, Raf P.S.: A proposito dell'argomento "Qualità", riporto una citazione che spesso ricorre nelle mail di un nostro "custome...
Java Communications Without JNI JNA is an open source project maintained by Tim Wall that allows you to write Java code only to call into native libraries (i.e., DLLs on Windows). Without JNA, you would have to write potentially complex Java Native Interface (JNI) code or other glue code to make this work. For instance, the following code sample from the JNA Wikipedia page works as-is on Windows, Linux, or OS X, to call the native C runtime printf function: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.Platform; /** Simple example of native library declaration and usage. */ public class HelloWorld { public interface CLibrary extends Library { CLibrary INSTANCE = (CLibrary) Native.loadLibrary( ...
Commenti