> I like more "shared" instead of "yours"

But that's because that's the way you are
thinking about the problem/solution.

I'm just talking about a very local trick
of having autoargs instead of explicitly
passing args in parens. The fact that this
ends up creating an elegant alternative to
dangerous globals is in an important way a
mere somewhat surprising side-effect that
you don't even need to tell a newbie or
even an expert. It just works.

I've considered names like "passed",
"autoarg", "implied", and so on.

But ultimately yours seems to say it all:

    my $foo is yours;

My means my lexical and yours means your
lexical where sub calling is the boundary
of what's mine and yours.


> (secret) symbol-table

I would have thought the symbol table
handling for implicit (your) args would
be the exact same as for regular explicit
args passed in parens.


> so you propose dynamic (???) sharing.
> I propose *static* sharing -- but in
> practice they are *the same* --

I'd claim that:

1. Autoargs would work with threads, static
sharing won't.

2. By requiring explicit marking of autoargs
all along the call chain, one retains a key
advantage of explicitly passing args, namely
avoidance of accidental action-at-a-distance.
Just look at a sub's sig to know what is
being shared between it and its callers.

3. Autoargs are significantly less verbose
in many scenarios.

4. Autoargs are conceptually simpler than
shared variables, for both newbies and
experts. But clearly this is subjective. :>


--
ralph

Reply via email to