[TCLCORE] Re: [Xotcl] TIP #257: Object Orientation for Tcl

Kristoffer Lawson setok at fishpool.com
Wed Sep 28 18:23:28 CEST 2005


On 28 Sep 2005, at 18:49, Donal K. Fellows wrote:

>
> The TIP is (totally!) light on C-level API, largely because I've no  
> idea
> what needs to go there. I'd even be happy (personally speaking)  
> with an
> OO system that did not provide any C-level API at all. Other people  
> will
> probably disagree. :-D

Well yeah, I'd disagree in the sense that if any OO framework goes  
somewhere near the core, I'd like to see Tk being implemented in  
terms of it (or indeed any other C-based extension which uses  
objects). Not immediately, of course, but in the long run.

>
> BTW, I was wondering what happens when you do this in XOTcl (ignoring
> the syntax for now):
>
>   class A derived from Object
>      defines instproc foo
>   class B derived from A
>      defines instproc bar
>   class C derived from Object
>      defines instprocs foo, bar and move
>
>   object D is a C with B mixed in
>      call: D foo
>      call: D move
>
> Which implementation of foo gets called first? Which implementation of
> move gets called first?

I believe C's foo gets called first, then A. There's only one  
definition of move so that's easy , C:)

            /  http://www.fishpool.com/~setok/



More information about the Xotcl mailing list