4 ms·
.NET isn't native, doesn't it use the CLR? Even Java apps shouldn't be considered native as they use JVM. True native is apps written in C/C++ or Rust that are
by schoubey 4y ago
.NET isn't native, doesn't it use the CLR?
Even Java apps shouldn't be considered native as they use JVM.
True native is apps written in C/C++ or Rust that are compiled to run without a virtual machine. I haven't seen any webapps faster than native apps.
- metadat 4y agoMy definition for "native apps" are platform-specific binaries which run locally outside of a web browser. Otherwise.. where is the line? you could claim that it must be handcrafted assembly in order to be native.
- _0ffh 4y agoNative, quite reasonably, means the application is compiled to the CPU's native machine code. Take as an example the distinction between Java and native apps on Android.
- wmf 4y agoMany people, quite reasonably, consider an app native if it uses the OS APIs without any intermediate portability layer.
- _0ffh 4y agoWhat is a VM but an intermediate portability layer? That's what VMs are made for, to be able to run the same VM code on different machines or different OSs without having to recompile. You don't use the OS's APIs directly from Java or NET, that's the whole point of the exercise. And if you find a way to do it anyway, you have defeated the purpose of the VM and could as well have compiled to native code.
- wmf 4y agoWeren't .NET and its APIs originally Windows-only and they only became portable later? And doesn't .NET have AOT support?
- metadat 4y agoFor Java, is the JVM apps run atop of compiled for the native CPU architecture? Does this matter?
- schoubey 4y agoJVM is a virtual machine with its own instruction set. Java code is compiled to this instruction set and not the actual's CPUs instruction set, hence not native.
- schoubey 4y agoThis is my understanding of native, thanks for putting out a better description.
- schoubey 4y agoNo one is asking for hand crafting, we are merely arguing that the absence of runtime environment which abstracts away from CPU's native instruction set. Hence I mentioned C, C++, Rust. Even GO and Haskell qualify as they are compiled to native instruction set of the CPU on which they run.