guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smart variables, dumb variables


From: Marius Vollmer
Subject: Re: Smart variables, dumb variables
Date: 15 Aug 2002 21:43:00 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden writes:

> BTW, i'm not really happy with guiles current behavior regarding declaring
> a generic that's allready existing. I'd expect that a (define-generic foo)
> on a function that's allready will be a no-opt.

Me neither.

>  (use-modules (oop goops))
>  +
>  =>  #<primitive-procedure +>
>  (define-method (+ (a <string>) (b <string>)) (string-append a b))
>  +
>  => #<primitive-generic +>
> 
> Humpf! I know, this is actually a nice optimisation in this code, but
> it shouldn't be so visible.

Should it print #<primitive-generic +> from the start?

> So, if i understand you right, the compiler would generate code that
> contains _two_ branches, one for the fast numeric code (inlined) and
> one for the normal generic method dispatch?

Yes.
 
-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

[Prev in Thread] Current Thread [Next in Thread]