On Sat, Nov 21, 2009 at 4:37 PM, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,Very nice. A generalized version might be more useful to your readers:
>
> Am 21.11.2009 um 05:22 schrieb Mark Engelberg:
>
>> Which reminds me, every once in a while I see people talking about
>> this here, and brainstorming up some alternatives to binding that
>> might interact better with lazy data structures. Has there been any
>> real progress on this, or has every proposed solution been equally
>> problematic?
>
> I wrote up a little blog post on the problem and the possible solutions.
> Feedback welcome.
take an input seq, and return an output seq which is evaluated
stepwise in the binding environment.
Best,
Graham
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
Am 23.11.2009 um 21:46 schrieb Garth Sheldon-Coulson:
> bound-fn is very nice, but I've found that capturing *all* dynamic
> vars is often overkill.
As I said in said thread: I don't think, that this is a big problem.
The number Vars having actually a non-root binding should be rather
small in the general case. So the saving is not thaaaat large. (For
the case file: I asked exactly this in the assembla ticket, but got no
answer.)
> In fact, I would argue (subject to persuasion otherwise) that
> capturing all dynamic vars should be the very rare exception rather
> than the rule. In most cases, it seems to me that a developer should
> capture just the dynamic vars that he or she has defined in that
> particular app, allowing other dynamic vars to reset in new threads
> as they otherwise would. Another library might expect this resetting
> of its dynamic vars, or the user might expect it of Clojure's
> default bindings.
Hmm... I see your point, but I'm not sure. I think, the environment
should be consisted. If I don't use the other Vars, then there is no
problem. If I use them, I'd expect them to not change under the
code... Maybe I prefer the current solution.
> Analogously there could be a bound-lazy-seq-with (or whatever name)
> for defining lazy seqs bound over dynamic vars.
bound-seq might be a nice complement to bound-fn. Rich?
Sincerely
Meikel