March 01, 2004

More and more on objects

With the first release to support objects out, the question is now "What the heck can you do with the things?" (And no, I don't know why people ask me these sorts of things, since I don't really like objects. Go figure)

That's a good question. Mostly a better question than "What will I ultimately be able to do with the things" since who knows, maybe I'll give up half-way through and say good enough. It's been known to happen before. (With objects in general, not with me and objects specifically, but that's a separate issue for another day. Tomorrow, maybe)

So, we've got a system where we can call methods, though only specific methods with no fallbacks. We can have classes with one or more parents. Each class in a hierarchy can have as many private slots in an object as it wants. We have a namespace system that works OK as long as you only have a single level of namespace. (And it's possible that, by the time you get around to using namespaces, that it won't even be an issue, as getting this fixed up right is high on the list 'o things that need doing)

It is, oddly, amazing what you can do with this sort of thing. It's enough to support many statically typed object systems, though you do need to disallow operator overloading. The lack of implicit construction's a bit nasty, but you can actually get around that with the compiler if you so chose. No implicit destruction's more problematic. On the other hand I have at least three separate, potentially conflicting, destruction schemes. (Don't ask, you don't want to know. I'll tell you anyway, but later) Can't make do without destruction, though, not really. Sorta.

Which means that parrot objects are at a state where it's worth digging in in preparation for 0.1.1, which will have construction, destruction, and fallback methods, but probably not an end unto itself. Yet. ;)

Posted by Dan at March 1, 2004 02:29 PM | TrackBack (0)
Comments