Go 1.9

Araq via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 23 12:27:56 PDT 2017


On Thursday, 22 June 2017 at 11:27:47 UTC, Paulo Pinto wrote:
> Java is AOT compiled to native code via Excelsior JET, IBM J9, 
> IBM Websphere RealTime, JamaicaVM, SubstrateVM, Android ART and 
> eventually Java 10.
>

Have you used one of these products? How do they deal with 
dynamic class loading? I know how JamaicaVM does it, no thanks.

>
> C# is AOT compiled to native code since day 1, via NGEN, 
> althouth it isn't an optimizing compiler and only supports 
> dynamic linking.
>

 From 
https://docs.microsoft.com/en-us/dotnet/framework/net-native/net-native-and-compilation

"Because the .NET Native tool chain links implementation code 
into your app only if it knows that your app actually invokes 
that code, either the metadata or the implementation code 
required in the following scenarios may not be included with your 
app:

* Reflection.
* Dynamic or late-bound invocation.
* Serialization and deserialization.
* COM interop.

If the necessary metadata or implementation code is absent at 
runtime, the .NET Native runtime throws an exception. You can 
prevent these exceptions, and ensure that the .NET Native tool 
chain includes the required metadata and implementation code, by 
using a runtime directives file, an XML file that designates the 
program elements whose metadata or implementation code must be 
available at runtime and assigns a runtime policy to them. The 
following is the default runtime directives file that is added to 
a Windows Store project that is compiled by the .NET Native tool 
chain: ..."

> Better learn what the competition is actually doing.

Reflection and dynamic class loading are essential parts of C# 
and Java and do not work well with AOT compilation and never 
will. Money can't patch over design mistakes.


More information about the Digitalmars-d mailing list