« Return to Thread: Creation procedures and the ECMA standard

Creation procedures and the ECMA standard

by David Jenkins-5 :: Rate this Message:

Reply to Author | View in Thread

Recently there was a thread on this forum that touched on
preconditions of creation procedures.  It reminded me of a time
several years ago when I believed I had found a hole in Eiffel's
otherwise elegant design.  I came upon a case (which I had foolishly
written myself) where a precondition of a creation procedure could
not be called by a client attempting to instantiate the class,
because the precondition was a feature of the class itself (a
creation procedure Catch-22).  Something like this:

class
        A
create
        make
feature -- Initialization
        make is
                require
                        f
                do
                       
                end
feature
        f: BOOLEAN is
                do
                        Result := False;
                end
end

Wondering if the ECMA standard had anything to say about this case, I
checked the standardization document, and found section 8.20.3, which
declares that a creation procedure like 'make' should be invalid
(validity check VGCP), because there is an unqualified call in the
precondition.

This class, though, compiles cleanly in EiffelStudio 6.2 (and
predictably throws a run-time error if you try to instantiate A).

I'm wondering, is this an example of a compiler check that
EiffelStudio will one day include?  The ink is hardly dry on the ECMA
standard; it's understandable that not all its rules would be in the
current version of the compiler.  Is implementing all of the ECMA
standard the eventual goal of EiffelStudio?


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

 « Return to Thread: Creation procedures and the ECMA standard

LightInTheBox - Buy quality products at wholesale price