Skip to content
Prev 22089 / 63421 Next

validity testing as part of '@<-'

all those points are good ones, i just wonder what happens to S4  
"guarantees" when invalid objects are allowed to exist.  one of the  
advantages of methods, as i understand, is that they can be written  
with absolute confidence about what is being passed to them, and thus  
do not need to contemplate a bunch of different possibilities (and as  
a result can be terse and stylized).  it seems if you really want  
bulletproof code, you have to make validObject the first call in any  
method definition to which an object with a validity method is being  
passed (and which relies on receiving a valid object).  i am not sure  
whether the time spent in those validObject calls is less than the  
time that might be spent in enforcing validity checks on all possible  
object mutations.

at any rate, i am certainly one of the less experienced people on  
this mailing list, so i will not shake the tree too hard, because i  
probably don't appreciate the sacrifices that might be required.   
just thought i'd toss it out there.

fp
On Sep 21, 2006, at 2:35 PM, Byron Ellis wrote: