--

On Fri, 14 Mar 2003 10:08:15  
 Larry Wall wrote:
>On Thu, Mar 13, 2003 at 07:36:00PM -0800, Brent Dax wrote:
>: I think that there should be two types of arg typing[1]: 'strict' and
>: 'loose'.  Strict arg typing doesn't coerce, except to turn subclasses
>: into superclasses; loose arg typing, on the other hand, coerces whenever
>: possible.  The mechanism for choosing between strict and loose arg
>: typing should be under the caller's control, not the callee's.  (The
>: callee decides what types they want, and the caller decides how to
>: create those types.  This seems consistent with Perl's philosophy of
>: being flexible and making B&D optional.)
>
>Precisely.  The parameter types are completely invariant for the
>callee.  They are optionally invariant for the caller depending on some
>kind of stricture.  But I darn well want the naive user to be able to
>pass a Scalar to an Int parameter and have it DWTM without them knowing
>a blessed thing about these mysterious entities called "classes".
>
>We've got to keep the entry ramp low, or Perl is no longer Perl.
>
>The real question is whether this particular stricture is part of the
>default "use strict" that classes and modules assume.  There are
>decent arguments on both sides of that one, but just to mollify Damian
>I'm inclined to come down on the strict side for that.
>

I'll put my vote down on strictness (as in "complain about mismatch 
as soon as possible") by default.


But just as prototypes are ignored when we prepend & in Perl 5 can't 
some similar frobobnitz say "But on this here call, wait till runtime 
and coerce if needed"? After all, it's not the kind of thing a callee 
should dictate, but the caller.


>This week.  :-)

I'm easy.

-Erik
>
>Larry
>


____________________________________________________________
Get 25MB of email storage with Lycos Mail Plus!
Sign up today -- http://www.mail.lycos.com/brandPage.shtml?pageId=plus 

Reply via email to