Michael Fowler wrote: 

> > > Which then raises a few more problems (whew): how do you coax user input
> > > (which is an SV) into a value $foo can accept with very-strict on?
> >
> > You run it through an explicit conversion process, like using C<atoi()> in
> > a C program
> 
> Unfortunately, this involves more cooperation from the compiler; it has to
> provide a way of declaring the return value of a subroutine.  I'm not sure
> if this is out of the question, it may be more generally useful outside of
> type-checking.

Look how easily (?) everyone started using "my" variables instead of
just variables.  With the carrot of Compiletime-Bound-Speed for
the _low_low_cost_ of declaring things you know are going to be working
together with object names (no complex declarations required, this is
perl, the objects spring into existence based on consistent usage w/in
the code in question) it can't help but catch on fairly quickly.

Even if it means the parser has to do a linking pass.

 
> > >; what
> > > happens when an external function (say, from a module) is being very-strict,
> > > but is passed arguments from code that doesn't do type checking?
> >
> > This is documented in the module's documentation, so (I say this at the
> > risk of bringing on the wrath of those who hate C++ casting) a conversion
> > method must be called.
> 
> I had also thought of the ability to write wrapper subroutines, with the
> appropriately declared parameters and return value, for those modules and
> subroutines that don't provide them.
> 
> The point is to leave it up to the person wanting type checking to make sure
> it's working everywhere, and not force it on anyone else in -any- way.

Maybe objects that fail to provide impliable interfaces to and from
CSTRING and DOUBLE could generate a compile-time warning, instead of
(or in addition to) just stringifying into RESTAURANT::INDIAN(0xFF23D)
and zero, respectively


 
> Michael
> --
> Administrator                      www.shoebox.net
> Programmer, System Administrator   www.gallanttech.com
> --

-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
:wq

Reply via email to