On Tue, Nov 30, 2004 at 02:26:06PM -0800, Brent 'Dax' Royal-Gordon wrote:
: I like this in general. However...
:
: Larry Wall <[EMAIL PROTECTED]> wrote:
: > * Since we already stole angles from iterators, Â$fh is not
: > how you make iterators iterate. Instead we use $fh.fetch (or
: > whatever) in scalar context, and $fh.fetch or @$fh or $fh[]
: > or *$fh in list context.
:
: I believe you tried this one a couple years ago, and people freaked
: out. As an alternative, could we get a different operator for this?
: I propose one of:
:
: $fh ->
: $fh (and $fh>>)
: $fh>
:
: All three have connotations of "the next thing". The first one might
: interfere with pointy subs, though, and the last two would be
: whitespace-sensitive. (But it looks like that isn't a bad thing
: anymore...)
:
: Any other suggestions, people?
Well, the IO::All folks will have their own ideas. The thing I don't
like about IO::All is the way it overloads angles. So maybe if we have
$foo â io('myfile')
we also get the unary:
â io('myfile')
Actually, if you buy the metaphor that the filesystem is "below", then
I kinda like:
$foo â io('myfile')
and
âio('myfile')
But then it's not a general iterator iterator. Plus it has the Unicode taint...
Back to reality, another thought to weave in here is that something
like
for $iterator.each -> $x {...}
might specify that there may be ordering dependencies from loop
iteration to loop iteration, whereas (since junctions are inherently
unordered) saying:
for $iterator.all -> $x {...}
explicitly tells the system it can parallelize the loop without worrying
about interation between iterations.
Larry