4 ms·
So, this is a step towards implementing plugins for go right? It seems to me like this could be used to implement dynamic code loading.
by mpnordland 12y ago
So, this is a step towards implementing plugins for go right? It seems to me like this could be used to implement dynamic code loading.
- bigdubs 12y agoDynamic code loading is what makes C#/.net orm's fast (see Dapper, Destrier, PetaPOCO etc.) Basically they let you use an IL generator to emit a bunch of IL operations, then compile them to a delegate. This is useful specifically for creating the methods that take a data reader and turn discrete columns into fields on a database mapped object. As soon as we can do this with Golang the orms we use will get much faster.
- andrewchambers 12y agoNo, this is just a hack that is probably broken because the runtime doesn't know about the patched functions. The Go team are working on proper loadable modules.
- bouk 12y agoHow is it broken?
- andrewchambers 12y agoWell, in the future the go runtime might require more detailed stack info other things to enable future things like concurrent garbage collection. Also, different implementations of Go have different requirements and calling conventions.