On Sun, Oct 05, 2008 at 02:10:02PM +0000, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Well, if you want them in pike they have to be objects.
i meant: aren't they objects in java too?
My point is that people might argue that mapping should have all those variants, just as they argue that int should have an unsigned variant (or that string should have an unshared variant, or that float should have a longer variant, or whatever).
All such arguments don't fit very well with the very deep integration of the basic data types. One could possibly argue for modifying (slightly) the behavior of one of these types, but adding another one is basically a no-no.
ahh, i see where this is going. essentially i think it can be argued that the basic types are designed to be simple and optimized, and having more such types would reduce that.
Worth noting that it wouldn't necessarily have to be that way, though. The pike internals could have been built with a different architecture so that all referenced data types (i.e. everything except native integers and floats) are basically handled as objects, and all the special behaviors of the type system and operators etc would be controlled by properties in those objects (like in any pure object oriented language).
a pure object pike would indeed be nice :-) but wouldn't that cost optimization?
greetings, martin.