[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generators (iterators) for Gnu Emacs
From: |
Daniel Colascione |
Subject: |
Re: Generators (iterators) for Gnu Emacs |
Date: |
Fri, 05 Dec 2014 10:34:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 12/05/2014 09:48 AM, Stefan Monnier wrote:
>> No. Daniel's package https://github.com/dcolascione/elisp-generators. Do
>> you have time to critique the code and make it an integral part of
>> elisp? Thanks ;)
>
> Oh, one more thing: is it technically important to sign the end by
> signaling a `stop-iteration', rather than by returning a special value?
> I think I'd prefer returning a special value (`condition-case' tends to
> be on the costly side).
I'd really rather signal to stop iteration. That way, it's harder to ignore
end-of-iteration and loop forever and it remains possible to iterate over *any*
value. condition-case is setjmp. I'm not *that* concerned by performance. The
only other reasonable alternative is for iterators to yield a cons (terminal-p
. value), and consing is going to be much worse than condition-case.
signature.asc
Description: OpenPGP digital signature
- Generators (iterators) for Gnu Emacs, Michael Heerdegen, 2014/12/04
- Re: Generators (iterators) for Gnu Emacs, Stefan Monnier, 2014/12/04
- Re: Generators (iterators) for Gnu Emacs, Leo Liu, 2014/12/04
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/04
- Re: Generators (iterators) for Gnu Emacs, Leo Liu, 2014/12/04
- Re: Generators (iterators) for Gnu Emacs, Stefan Monnier, 2014/12/04
- Re: Generators (iterators) for Gnu Emacs, Leo Liu, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Stefan Monnier, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Stefan Monnier, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs,
Daniel Colascione <=
- Re: Generators (iterators) for Gnu Emacs, Stefan Monnier, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Stephen J. Turnbull, 2014/12/06
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05
- Re: Generators (iterators) for Gnu Emacs, Daniel Colascione, 2014/12/05