Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, andwantarray() changes

[email protected] (Chaim Frenkel) 24 Aug 2000 11:50:31 -0400
Newsgroups perl.perl6.language.subs
Message-ID <[email protected]>
How would you handle differentiating between safe-coding practices and
debugging type (internal) pre/post conditions?

<chaim>

>>>>> "DC" == Damian Conway <[email protected]> writes:

>> I would have assumed that a pre/post/invariant would not be used regularly,
>> but rather under optional control. So this would lose that feature.

DC> The option is to opt out of preconditions, not opt in.

DC> Besides, I intend to propose an attribute that makes them un-opt-out-able:

DC> 	sub new { bless {}, $_[0] }
DC> 	sub x   { lreturn $_[0]->{x} }
DC> 	post x : mandatory  { $_[0]->{x} >= 0 }

DC> Damian




-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
[email protected]				               +1-718-236-0183