home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / eiffel / 1451 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  1.4 KB

  1. Path: sparky!uunet!pipex!demon!cix.compulink.co.uk!wil
  2. Newsgroups: comp.lang.eiffel
  3. From: wil@cix.compulink.co.uk (William Stuart-smith)
  4. Subject: Re: creation                            
  5. Cc: wil@cix.compulink.co.uk
  6. Reply-To: wil@cix.compulink.co.uk
  7. Date: Sat, 23 Jan 1993 01:10:00 +0000
  8. Message-ID: <memo.887754@cix.compulink.co.uk>
  9. Sender: usenet@demon.co.uk
  10. Lines: 27
  11.  
  12. bertrand@eiffel.com (Bertrand Meyer) writes
  13. > I don't really understand the example. How does the system initialize [the
  14. > reference associated with] x: by creation, or by assignment from y?
  15.  
  16. 'x' is initialized by creation. A simple way to look at this is as two
  17. fragments, both involving the same two types.
  18.  
  19.   A 'V' conforms to a 'U'; V has no 'cp'.
  20.  
  21.   [1]  x: U;  y: V;     !! x.cp;  x:=y
  22.  
  23.   [2]  x: U;  y: V;  ! U ! x.cp;  x:=y
  24.  
  25. As I interpret ETL (in particular p371, the parenthesis in para 6), the two
  26. fragments are semantically identical. [1] is just a shorthand for [2]; since
  27. we know that 'x' is a 'U', the second occurrence of 'U' in [2] is redundant,
  28. and one fragment can be transformed into the other by textual substitution
  29. with no change in semantics.
  30.  
  31. According to the description of system level validity, however, the two
  32. fragments are different: [2] is valid and [1] is system-invalid.
  33.  
  34. This strikes me as inconsistent, or at least unreasonable. It seems to me
  35. that "!!" is nothing more than semantic sugar. Why should its use affect
  36. validity?
  37.  
  38.  
  39.