Re: Optional attributes

Date view Thread view Subject view Author view Attachment view

From: Shane Sendall (
Date: Tue 18 May 2004 - 21:00:45 BST

Joaquin Miller wrote:

> Apologies if i jerked that chain too hard. 

:-) No need to apologize. I enjoyed making the reply...

> Next, we can discuss whether null is a value.
> One possible decision is that null is not a value; instead, the word, 
> 'null' is used to mention the absence of any value. 

Certainly from a language definition point of view. 'null' as meaning 
the absence of a value is the most elegant, because IMO this is the real 
reason/meaning for 'null'. That is another good reason why OclUndefined 
is less appropriate for representing 'null' in OCL.

> In that case, it is often necessary for tools to use, in the 
> implementation, some distinguished item to indicate the absence of any 
> value.  (An example is when the design does not permit removal and 
> addition of slots, and a slot is to contain an integer.  In that case, 
> the representation of some outlying integer value might be used to 
> indicate, not that integer, but the absence of any value.)  We need to 
> distinguish model or concept from tool implementation, in order to 
> discuss this. 

I agree. Although, it can sometimes be difficult to make this separation 
invisible to the user.


> We are already distinguishing between the absence of a slot and an 
> empty slot, which is good.
> [Don't ask me whether I am using 'slot' in the sense that it is used 
> in the formal semantics proposed for UML by the 2U submitters, or am 
> using it in the sense of a memory location in an implementation.  I'm 
> trying to dodge that.  I'm not even sure whether the 2U "semantics" (i 
> quote the word from what they wrote) is a formal semantics, or about a 
> class of implementations.  I stand by to have my chain jerked now.  (I 
> bet we will also benefit from distinguishing between the concept, 
> empty slot, and implementations of that concept.)]
> Cordially,
> Joaquin

Date view Thread view Subject view Author view Attachment view