dlopen(3) and its friends allows a C developer to dynamically link to symbols at runtime, the ClassLoader.forName() method allows a Java developer to dynamically load classes at runtime, and other languages have similar constructs. Runtime linking is an extremely useful feature for implementing a module system so in-house developers or 3rd parties can create new implementations of well-defined interfaces; Apache HTTPD is a good example of how to use this effectively. Runtime linking has a number of benefits, not the least of which is security: a user (at runtime) can disable large chunks of code to limit the attack surface.
The May 2015 The State Of Go talk addressed this feature in the execmodes document, specifically:
- Go code as a shared library plugin with a Go style API
- Go code that uses a shared library plugin
It states that neither of these are to be available in 1.5 and indeed they do not appear to be. What's your take on runtime linking? Do you consider it a priority and do you think it'll be available in the next release?