I'm not so sure it's really necessary for new things. Disk and memory are now cheap and plentiful enough that most of the advantages of shared libraries don't outweigh the advantages of static ones.
I'm not so sure it's really necessary for new things. Disk and memory are now cheap and plentiful enough that most of the advantages of shared libraries don't outweigh the advantages of static ones.
You can see a recent proposal for shared library support in Go and some reactions here:
https://groups.google.com/forum/#!topic/golang-nuts/zmjXkGrE...
So unless what you're talking about has happened in the past few months, I'm not aware of true shared library support in Go.
Practically speaking, shared library support is absolutely necessary if you're looking to use a low-level language as a means of speeding up a dynamic language. Or least highly-desirable (you can use IPC, but you lose a lot of speed, which is often the reason why you're using the lower-level language in the first place).
From the gonuts-dev discussions, Go main toolchain might actually get support for dynamic loading in the future.
So I was wrong it seems.
To be clear, D can use the shared C libraries of your system just fine since the beginning.
When D people talk about shared library support, they mean: create a D shared library, which is used by C/C++ code. The tricky part is stuff like initializing the runtime.
But nobody prevents the Gccgo people from implementing their implementation differently. (It's just that for Google, this is really not a pressing issue.)
And this is why Android will never get official Go support.
- Android only uses dynamic loading
- The Android team does not seem to care about Go
- The Go team is religiously against dynamic loading
So I bet D and Rust compilers will be able to support Android, before Google will support Go in the Android SDK.
Do you have any pointers about it?
https://github.com/mozilla/rust/wiki/Doc-building-for-androi...
it does not look like it is production ready, if this is really the latest state.
This is not something I can put into an APK.
Also, "Android only uses dynamic loading" - given the existence of NDK, how is that true? As far as I know, you can link statically whatever you want.
True. However the ones responsible for writing the main compiler are against providing such support on the official compiler toolchain.
> Also, "Android only uses dynamic loading" - given the existence of NDK, how is that true? As far as I know, you can link statically whatever you want.
The NDK only produces shared objects as final binaries. You are allowed to produce static libraries to link on your final .so, but that is about it. You cannot produce pure executables.
The code compiled with the NDK is loaded and executed from a DalvikVM instance.
The NativeActivity that so many people without NDK knowledge think is native code, is actually a Java class that inherits from Activity, loads the produced .so and delegates the Android events into native code.
Point two- nobody is that interested- is the real thing.
The problem is producing .so to be loaded by others.