emacs-devel
[Top][All Lists]
Advanced

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

Re: streams are cool, you could stream virtually anything!


From: John Wiegley
Subject: Re: streams are cool, you could stream virtually anything!
Date: Fri, 06 Nov 2015 10:41:19 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

>>>>> Nicolas Petton <address@hidden> writes:

> No, I guess that was for `stream-first' and `stream-rest', right?

Correct, I didn't mean to talk about stream-pop/push, but first/rest.

Since first/rest do mean car/cdr in cl.el, having both sets makes sense. But I
also meant to comment on how we choose more streaming names in the future.

As someone else mentioned, lists and streams overlap at the notion of
sequences -- the main differences being the operational semantics of laziness,
and the semantics of allowing infinite streams.

So let's say I've written a function over lists, and I realize I want it to
act on streams instead. I'd hope that I could just insert "stream-" in several
places and fulfill that need. If I have to also change over to a different set
of names for the same effective operations, that would be unfortunate.

One could even imagine a wrapper library that works on both lists and streams
-- since lists are effectively pre-computed streams -- but that may be more
than we need just yet.

John



reply via email to

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