Yes, agreed. But one could also write:

 >   void maybeCleanUpMess(SwitchPoint sp) {
 >     if (mysp.isInvalid())  {
 >       ... // do cleanup after invalidation
       } // else nothing to do
 >   }

I don't know if one style is better than the other
generally.

It's just that doing something based on the
value of an unstable predicate seems slightly
counterintuitive, but of course below you are _not_
doing something based on not seeing a stable
predicate.

Anyway, that was just an off-the-cuff remark -- sorry
for the interruption... back to your normal programming
now (pun intended :-)

-- ramki

On 05/26/11 13:33, John Rose wrote:
> On May 26, 2011, at 1:21 PM, Charles Oliver Nutter wrote:
> 
>> isInvalid seems a bit double-negativy to me.
> 
> That's my hesitation.  Consider the use case:
> 
>   void maybeCleanUpMess(SwitchPoint sp) {
>     if (!mysp.isInvalid())  return;
>     ... // do cleanup after invalidation
>   }
> 
> It reads better as:
>     if (mysp.isValid())  return;
> 
> -- John
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to