From: Nicolas Petton <nicolas@petton.fr>
To: Michael Heerdegen <michael_heerdegen@web.de>,
Emacs Development <emacs-devel@gnu.org>
Subject: Re: [PATCH Elpa: streams.el] Add systematic tests against bogus element generation
Date: Fri, 16 Sep 2016 19:00:45 +0200 [thread overview]
Message-ID: <87y42rok3m.fsf@petton.fr> (raw)
In-Reply-To: <87y42rx5vt.fsf@web.de>
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
Michael Heerdegen <michael_heerdegen@web.de> writes:
Hi Michael,
> +;; A note for developers: Please make sure to implement functions that
> +;; process streams (build new streams out of given streams) in a way
> +;; that no new elements in any argument stream are generated. This is
> +;; most likely an error since it changes the argument stream. For
> +;; example, a common error is to call `stream-empty-p' on an input
> +;; stream and build the stream to return depending on the result.
> +;; Instead, delay such tests until elements are requested from the
> +;; resulting stream. A way to achieve this is to wrap such tests into
> +;; `stream-make' or `stream-delay'. See the implementations of
> +;; `stream-append' or `seq-drop-while' for example.
Very good, thank you!
Feel free to push this patch.
Cheers,
Nico
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2016-09-16 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 14:43 [PATCH Elpa: streams.el] Add systematic tests against bogus element generation Michael Heerdegen
2016-09-16 17:00 ` Nicolas Petton [this message]
2016-09-17 13:51 ` Michael Heerdegen
2016-09-23 15:22 ` [PATCH Elpa] Fix errors detected by tests added in last commit (was: [PATCH Elpa: streams.el] Add systematic tests against bogus element generation) Michael Heerdegen
2016-09-23 16:49 ` Nicolas Petton
2016-09-24 14:05 ` [PATCH Elpa] Fix errors detected by tests added in last commit Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y42rok3m.fsf@petton.fr \
--to=nicolas@petton.fr \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.