Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!pacbell.com!ucsd!hub.ucsb.edu!eiffel!bertrand From: bertrand@eiffel.UUCP (Bertrand Meyer) Newsgroups: comp.lang.eiffel Subject: Re: How can I do this in Eiffel? Summary: Reuse library class Message-ID: <529@eiffel.UUCP> Date: 16 Apr 91 01:25:39 GMT References: Distribution: comp Organization: Interactive Software Engineering, Santa Barbara CA Lines: 18 From by ajk@wren.cs.rmit.OZ.AU (Alan Kent): > Can someone tell me if I am missing something obvious? I cannot see how to > do this nicely in Eiffel. > > [Description of a need to iterate variously over trees] Reuse class C_TREE_ITER from the Iteration Library. If you need several types of iteration in the same context, use repeated inheritance. If the assumptions made by that class do not conform to your particular type of tree, and you do not want to change your data structures, imitate and adapt the ideas from C_TREE_ITER and other iteration classes from the library. If this happens please tell us (eiffel@eiffel.uucp) about your experience so that we can improve the library; or, better yet, submit an improved version to the Eiffel shelf, the mechanism for distributing reusable software components (shelf@eiffel.uucp). -- Bertrand Meyer Interactive Software Engineering Inc., Santa Barbara bertrand@eiffel.uucp