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

Re: [Xotcl] Class naming and creation

From: Zoran Vasiljevic <zv_at_archiware.com>
Date: Tue, 22 Nov 2005 12:01:25 +0100

On 22.11.2005, at 11:17, Zoran Vasiljevic wrote:

> Hi!
>
> What I need to do sometimes is to be able to cache
> classes because their creation (in our case) might
> be a costly operation.
>

Actually "Object naming and creaion" should be the
correct subject, as I would really need to intercept
the "new" and "unknown" and install custom code when
somebody does:

    Foo new
or
    Foo bar

Zoran

> For example:
>
> Class HeavyClass
> set hc [HeavyClass new]
> $hc whatevermethod
>
> can be quite time consuming. What I'd like to do
> is to "cache" "things" created by "new" or even
> for:
>
> HeavyClass hc
> hc whatevermethod
>
> What would be the best way to achieve this caching?
>
> Thanks for help.
> Zoran
> _______________________________________________
> Xotcl mailing list
> Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl