guile-devel
[Top][All Lists]
Advanced

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

Re: Elisp performance


From: Andy Wingo
Subject: Re: Elisp performance
Date: Tue, 04 Aug 2009 17:51:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi Ken,

As a voice from the the sidelines, I just want to say thanks for all
your input!

On Thu 30 Jul 2009 05:23, Ken Raeburn <address@hidden> writes:

> Would [open-coding primitives] interfere with possibly blending Scheme
> GOOPS code with Elisp someday? Or is the generic support there at a
> lower level than this? (E.g., a "marker" object holds a buffer handle,
> possibly nil, and an offset that automatically gets adjusted if text
> is inserted before it. You can use "(+ 1 marker)" and get back an
> integer one greater than the marker's current offset. If markers were
> implemented using GOOPS, would this use of "+" work, given the changes
> you're suggesting?)

This works fine already. If the arguments to the "add" opcode are not
fixnums, it dispatches to scm_add(), which has a few more numeric cases;
then if none of those cases match, it dispatches to the generic function
attached to +. Initially there is no such function, but if there is one,
it can be handled there. In this way javascript can specialize on
strings, so (+ "hello " "world") => "hello world".

Regards,

Andy
-- 
http://wingolog.org/




reply via email to

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