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.

This week.  :-)

Larry

Reply via email to