Creation procedures and the ECMA standard

View: New views
2 Messages — Rating Filter:   Alert me  

Creation procedures and the ECMA standard

by David Jenkins-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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/


RE: Creation procedures and the ECMA standard

by Emmanuel Stapf [ES] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I'm wondering, is this an example of a compiler check that
> EiffelStudio will one day include?  The ink is hardly dry on

Definitely, EiffelStudio has not reached full ECMA compliance yet and this
is the goal of Eiffel Software to reach ECMA compliance. We chose to achieve
compliance using incremental steps to ensure that most of the existing code
will still compile unmodified. And we also prioritize what we will implement
and this particular one is not high priority for the time being as it is
more a restriction to help you build a sensible design which can be done
today without this validity rule being implemented.

Regards,
Manu



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

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/