[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Type-checking of slot values



 FROM JONL
"      The two sentences you are comparing here aren't really that different:
	(1) "An implementation may or may not choose to check the type of the 
	     new value when initializing or assigning to a slot"
	(2) "An implementation is required to check the type of the value being
	     stored in a slot only under the safest compiler safety setting and
	     in the interpreter." 

   If I read (2), a type check is required when the SAFETY compiler switch
   is set to 3. No such thing is said in (1).

Not as I read it!  The phrase "<foo> is required only when <bar>" is definitely
not equivalent to the phrase  "<foo> is required whenever <bar>".  Could
this variant reading of "only when" be the source of all our disagreement?"

I certainly misread it that way.  If it said 
          An implementation is required to check the type of the value being
	     stored in a slot at most when under the safest compiler
          safety setting and in the interpreter."
Then it would be saying the same thing.  But why should one use the word require
if the intent is to not require, but allow under certain safetey conditions.
Would it be better to say:
	(2) "An implementation is allowed to check the type of the value being
	     stored in a slot only under the safest compiler safety setting and
	     in the interpreter."
This would stop it from being checked at other times.  What is the intent?