From: Krzysztof Drewniak on
Rainer Joswig <joswig(a)lisp.de> writes:

> Krzysztof Drewniak <krzysdrewniakNOSPAM(a)gmai.com> wrote:
>> Rainer Joswig <joswig(a)lisp.de> writes:
> ...
>
>>>
>>> So insteade inventing your own methods to read/write data
>>> and layer that on top of s-expressions, you could
>>> extend s-expressions directly. That way you would
>>> use the documented Common Lisp functions.
>> I have now dine as suggested. As the only thing that *really* needed
>> implementation was object, that was done with { type ((SLOT! .
>> VALUE1))
>> syntax. People with trunk should svn up and notice the immense speed
>> difference. Thanks guys!
>
> DEFMETHOD is a top-level macro. It is not good style to use it inside
> other functions.
>
> In your case it is called always when you want to serialize something.
> But that is not needed. DEFMETHOD only needs to run once
> to set the definition. The LET also has no useful effect on the
> DEFMETHOD, since
> it binds a special variable. If you have the let around the call to the
> printer,
> later then running method will see the dynamic value anyway.
>
> Besides that it is not necessary to run DEFMETHOD all the time,
> DEFMETHOD has top-level side effects, like, possibly
> informing the running Lisp about where its sources are.
>
> Anyway, your code looks much shorter now - which is great.
Thanks, and if you're ever poking around in my code and see something
fishy, please feel free to post here or the development list.

Thanks,
Krzysztof Drewniak
--
X-Real-Email-With-Antispam: krzysdrewniak at gmail dot com
pgp key on keyserver.ubuntu.com and maybe some other place too
First  |  Prev  | 
Pages: 1 2
Prev: parenscript this.bgcolor
Next: escape from parenscript