Dan Sugalski writes:
: Chicanery's on the big To Do list. I'm really wanting to defer list
: flattening as long as possible, and skipping it all together.
And I'm wondering whether it's better in general to explicitly force a
context in which we treat @foo and %bar as objects, rather than trying
to intuit when we can get away with it under the list flattening regime.
Not that we can't do that too, but I have a sneaking suspicion we could
easily confuse everybody if we try to get too fancy in using context to
differentiate between pass-by-ref and pass-by-value. We could certainly
confuse ourselves--we'd have to distinguish explicit references from
implicit references internally. Consider how you'd implement
push(@foo, @bar);
vs
push(@foo, \@bar);
If you defer the decision to flatten into the function, then you have
to distinguish those two kinds of reference.
I'm probably not making much sense, given that I made my coffee this
morning but haven't been awake enough to realize I actually need to go
back into the kitchen to get some of it...
Or I could just be getting old. The thing about getting old is that
it's not only later than you think, it's later than you *can* think...
Larry