[Xotcl] Mixins in XOTcl
Neil Madden
nem at cs.nott.ac.uk
Wed May 19 18:12:10 CEST 2004
On 19 May 2004, at 17:07, Michael Schlenker wrote:
> Kristoffer Lawson wrote:
>
>> On Wed, 19 May 2004, Michael Schlenker wrote:
>>
>>
>>> Its similar in tcl, where you have [info commands] and not a magic
>>> $commands variable as you might have in other languages.
>>>
>>> Using traces it should be possible to provide such an interface if
>>> anyone really wants it.
>>>
>>
>> So what is so problematic about just getting a list, manipulating it
>> and
>> then setting it back? Seems like a lot of copied effort for what is
>> basically just list manipulation.
>>
> Yep. I refer to Adam and Neil who both wanted to have mutable objects
> instead of accessor functions.
> Its the usual problem with mutable list objects and the tradional
> value based list operations in Tcl.
Woah there! I said nothing about mutable objects/values. Mutable
variables are all that is needed, and they exist already (in fact, you
have to go an extra step to get immutable variables). The idea is to
reuse things like [lappend], [linsert], [lreplace] etc, without
creating lots of [mixin_append], [mixin_replace] etc etc. That's the
duplication of effort.
Neil.
More information about the Xotcl
mailing list