Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
Well, they currently are not referenced from within the rest of Pike, except through their __builtin.* references.
The global namespace usage will only be used from userspace. So if we decide to move them elsewhere, that's fine. It's just that I myself couldn't come up with anything better than simply a global type; anything else seemed silly from a user standpoint.
:-).
There are other sets of basic types. Standards.BSON.Timestamp, Standards.ASN1.Types.UTC etc. Serializing and deserializing data is a recurring theme, so we should probably spend more time thinking on it on a higher level.
Yes, please. I know and have seen some of those; then again, a lot are hidden in various places in Pike. Consider this my first attempt to collect these more or less generically occurring types in a central place from where they can be easily reused by all libraries *and* endusers.
Right now I would prefer to not compile and put that code in the global name space every time Pike is started. Perhaps put it in Val for now.
Forgive my ignorance, but if they are linked in through the defined constants in the global module.pmod; is it then just as heavy during startup as if the whole objects would have been defined in there themselves?
Or is that lightweight and will not incur a large runtime penalty (memory or time-wise) until one of the object types are accessed?