==================================================================
> No special UPPERCASE_NAME subroutines

Whoa! What about ALLCAPS variables? Should we axe all of them as well?
They're the exact same idea.
==================================================================

What ALLCAPS variables?

==================================================================
Then how would Perl differentiate between your proposed types here:

   $obj = tie '@array', 'Tie::Array';
   $obj->STORE(1,2);

When I call them directly?
==================================================================

You should not call handlers directly.

If a need like this arises, then

  use tie STORE => \&store_handler;

allows

  $obj->store_handler(1,2);

==================================================================
Are you proposing a new method namespace? What about object-based  
polymorphic overloading? What about DESTROY, BUILD, TIESCALAR, etc,
etc?
==================================================================

Exactly my point.  All these names should not pollute the namespace.

==================================================================
And really, who writes normal routines in ALLCAPS? I never have.
==================================================================

"Who writes 3.14 if they are not meaning PI?  Let us make 3.14 a
shortcut for 4*atan(1)" mentality...


==================================================================
>  use tie STORE => sub { ... };
>
>not
>
>  sub STORE { ... }

Hmmm... this sounds like a less efficient approach. I think it's less
==================================================================

What do you think this has to do with efficiency?  As I explained, it
can only be *more* efficient, since tie.pm could register things and
modify caching data etc.

==================================================================
I think it's less clean, too: we'd be moving away from pure integrated
language, back into a hack.
==================================================================

My point is that ALLCAP names are hacks.

==================================================================
 * supposing UPPERCASE subs are still used for such speial functions
(callbacks, event handlers), Perl should warn if you use a sub with an
all uppercase name that isn't a registered callback. For example, in
using a tied filehandle, I made a sub CLOSE, and I wondered why it was
never called. It turned out that CLOSE wasn't a callback at the
time...
(It is now.)
==================================================================

What next?  Spellchecking names and rejecting misspellings?  But you
are right in the sense than my proposal addresses this problem as well.

Ilya

Reply via email to