« Return to Thread: rename and redefine with an attribute and a method

RE: rename and redefine with an attribute and a method

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

Reply to Author | View in Thread

> I want to replace this attribute c in a subclass with a method:

The simple answer is that it is not allowed by the language definition. This
is still open to discussion at the ECMA committee but currently the feeling
is that it might make things slower for incremental compiler and will slow
down dynamic access to such entities. However they were not strong feeling
about it. Since this restriction already existed in the past and all
existing compilers have kept this restriction the consensus was to leave
things as they are.

In your case, it means that in your ancestor you have to fake it by hiding
the attribute and exposing a function instead which will be redefined in
descendants.

Hope this helps,
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/

 « Return to Thread: rename and redefine with an attribute and a method

LightInTheBox - Buy quality products at wholesale price