[Seaside-dev] May I add an instance variable (cache) to WAFileLibrary?

Philippe Marschall philippe.marschall at gmail.com
Thu Jan 29 06:10:32 UTC 2009


2009/1/28, Paolo Bonzini <paolo.bonzini at gmail.com>:
>> WAFileLibraryTest>>#'testCompileByteArray' has encoded into the test the
>> requirement that the object returned by WAFileLibrary be identical. For
>> platforms that do not allow modification of static arrays, this means that
>> the value must be cached somewhere. I can create a global to hold a
>> dictionary, but that would be difficult to manage (at least without weak
>> references). Anyone object to adding an instance variable to
>> WAFileLibrary?
>> How about an initialize method that sets it to a Dictionary?
>
> I wonder if it isn't easier for you to support #[...] syntax in
> Gemstone instead? :-)

Pharo doesn't support it as well (with the old compiler).

The problem with a cache is that you need to invalidate it when the
method changes.

Honestly I think the caching currently used causes more trouble than
it's worth. I think we would be better of with it removed. Should we
do that we of course need a script to recompile all existing methods
to the new format.

Cheers
Philippe


More information about the seaside-dev mailing list