Hi All,

Ahhh, reflection, what a wonderful thing. Personal reflection I mean,
not programmatic reflection. In my last post I noted that I didn't
like the lit-word! syntax in Gabriele's latest version, but I'm going
to recant...a bit, and explain my thinking.

While I'm thinking about this whole COLLECT thing, I'm still using my
own version, and I that surely tainted my thinking (as I had just been
using it) when looking at Gabriele's.

Ladislav and I chatted a bit offline, and I was working on a survey to
get everybody's input on the subject, which gave me reason to go back
over the messages here and look at each design a little more
objectively. Here are some of my thoughts:

I didn't like the lit-word! arg syntax when thinking of functions like
REMOVE-EACH and FOR, which don't require it; but I *did* like it the
first time Andreas mentioned it, and I think I figured out why. With
my version, the argument is more noun-like, as with REMOVE-EACH and
FOR; with the function-oriented approach, it's more verb-like, but the
lit-word! makes me think of SET, and then the functional use of it in
the block doesn't feel right to me, where the set-word! syntax in mine
feels better (to me, obviously, but perhaps not to everyone).

Ladislav had mentioned the relation to SET as well and, if you think
of it that way, Gabriele's notation feels much better. i.e. "set
<this-word> to the function that is going to collect the data." (verb),
rather than "collect this value when I set it" (noun).

All that said, Gabriele's improved notation for /only (much more
flexible than the original), and with SET in mind, it got me thinking;
would there be value in COLLECT accepting a block of words, even a
dialect, as the collector argument, or is that just going off into the
realm needless complexity?

In terms of small blocks, just a few lines long, the simple approach
works very well. One of the things that bothers me about my own
version are the times where I have more than one distinct "type" of
value I'm collecting, and reusing the same word for all of them
doesn't lend itself to making the code more readable.

I'll stop here for now, but think about it. What would the perfect
dialect look like, in the domain of collecting values?

-- Gregg                         

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to