View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] poll for opinions

From: Zoran Vasiljevic <zoran_at_archiware.com>
Date: Thu, 21 Feb 2002 18:17:07 +0100

On Wednesday 20 February 2002 16:28, you wrote:

> we are working currently on various issues which we
> think are important for our 1.0 release:
>

Ok. The 1.0 is on the horizon :) This is good news!

> - speedup through byte-code support

I'd say, post a core-patch as-is on the website,
so people who'd like to use it can grab it from there.
I'm certainly going to try it, as soon as I get some
relief from the current pressure at work.

> - better components with introspection facilities

I'm already perfectly satisfied, but I'm sure
others would add something to this.

> - easy to use rel-db interface

I'm not using relational databases, so I can't
say much about it.

     - ...

Here I could add a thing :)

I'd like to see some kind of automatic object garbage
collection, for example, when an object gets defined
within a scope of a proc, I'd like it to get auto-destroyed
when this proc exits.

It could be something like:

Class foo
foo instproc init {args} {
    puts stderr "[self] comming"
    next
}
foo instproc destroy {args} {
    puts stderr "[self] leaving"
    next
}
foo instproc test {args} {
    puts "Hallo World"
}
proc dummy {args} {
    foo private fooVar ; # "private" might be a new constructor method
    $fooVar test
    return
}

When somebody calls "dummy" proc, a new "foo" object gets created
(the "private" method" and automatically destroyed when proc returns.
Can such thing be done with simple Tcl variable traces, hm?

>
> what do you think about the following variants:
>
> o proc m1 {} {
> [self] set x 123
> }
> o proc m2 {} {
> .. set x 123
> }
> o proc m3 {} {
> = set x 123
> }
> o proc m4 {} {
> => set x 123
> }
> o proc m5 {} {
> - set x 123
> }
>
> other ideas?

What about:

     o proc m6 {} {
       this set x 123
     }

The "this" command refers to the current object, like [self] does.

Cheer's
Zoran