[REBOL] Re: Antwort: Re: WYSIWYG programming
From: joel:neely:fedex at: 30-Oct-2000 8:20
[rebol-bounce--rebol--com] wrote:
> ... forskip has the same behavior as forall, leaving the series
> pegged ... This is by design...
> Some people find foreach pegging the series to be disconcerting,
> but it is a rather core aspect of REBOL, and it has a valid
> reason why it works that way.
>
Please, instead of repeating "There's a reason", say what it is!
Is there really some benefit to the user to have the block left
that way (as in my description of append vs. change), or does
this just make life easier for the implementor?
We all know that forall works on a series, while foreach extracts
values from the series; that doesn't mean that the series can't
be put back where it was. (First "good manners" rule learned in
kindergarten: "Put it back when you're through playing with it!")
It's not disconcerting... it's inconsistent and takes time/effort
to write
forall foo [...] foo: head foo
or (if there's a reason why foo is not at the head)
foo2: foo forall foo [...]
in almost every case! I'd bet that the overwhelming majority of
cases where foo is subsequently used have to resort to one or
the other of these workarounds, rather than having foo at end
being the most natural setup for what follows.
I'm perfectly willing to accept correction on this point from
other users, but that's been my experience.
-jn-