Reconciling Subtyping and Code Reuse in Object-Oriented Languages: Using inherit and insert in SmartEiffel, the GNU Eiffel Compiler | SpringerLink
Skip to main content

Reconciling Subtyping and Code Reuse in Object-Oriented Languages: Using inherit and insert in SmartEiffel, the GNU Eiffel Compiler

  • Conference paper
Reuse of Off-the-Shelf Components (ICSR 2006)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4039))

Included in the following conference series:

Abstract

SmartEiffel has been enjoying two different mechanisms to express subtyping and implementation inheritance for one year. After large scale practical tests and thanks to user feedback, this paper finalises the new typing policy of SmartEiffel, which combines two forms of multiple inheritance with genericity in one statically-checked, object-oriented language.

Having two forms of inheritance allows the designer to capture more design decisions in the source code. It is now straightforward to share reusable code between otherwise unrelated types. The new mechanism allows to reuse code from an existing class without polluting the reuser’s interface. It also enables an elegant implementation of some design patterns.

Furthermore, this mechanism helps compilers to statically remove more dynamic dispatch code. It can also be used to add a no-penalty and no-risk multiple-inheritance-like construct to a single-inheritance language such as Java.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Colnet, D., Ribet, P., Adrian, C., Croizier, V., Merizen, F.: Web site of SmartEiffel, the gnu Eiffel compiler, tools and libraries, http://SmartEiffel.loria.fr

  2. Colnet, D., Coucaud, P., Zendra, O.: Compiler Support to Customize the Mark and Sweep Algorithm. In: 1st ACM SIGPLAN International Symposium on Memory Management (ISMM 1998), Vancouver, BC, Canada, pp. 154–165 (1998)

    Google Scholar 

  3. Cook, W., Hill, W., Canning, P.: Inheritance is Not Subtyping. In: 17th ACM Symposium on Principles of Programming Languages, pp. 125–135 (1990)

    Google Scholar 

  4. ECMA Normalisation group for the Eiffel language definition TC39-TG4, http://www.ecma-international.org/memento/TC39-TG4.html

  5. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addisson-Wesley, Reading (1995)

    Google Scholar 

  6. Goldberg, A., Robson, D.: Smalltalk-80, the Language and its Implementation. Addison-Wesley, Reading (1983)

    MATH  Google Scholar 

  7. Gomes, B., Stoutamire, D., Vaysman, B., Klawitter, H.: Sather 1.1: A language manual, http://www.icsi.berkeley.edu/~sather

  8. Jézéquel, J.M., Train, M., Mingins, C.: Design Patterns and Contracts. Addison Wesley, Reading (1999)

    Google Scholar 

  9. Keedy, J.L., Heinlein, C., Menger, G.: Reuse Variables: Reusing Code and State in Timor. In: Bosch, J., Krueger, C. (eds.) ICOIN 2004 and ICSR 2004. LNCS, vol. 3107, pp. 205–214. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  10. Meyer, B.: Reusable Software. Prentice Hall, Englewood Cliffs (1994)

    Google Scholar 

  11. Meyer, B.: Beware of polymorphic catcalls, http://archive.eiffel.com

  12. Ribet, P., Adrian, C., Zendra, O., Colnet, D.: Conformance of agents in the Eiffel language. Journal of Object Technology (JOT) 3(4), 125–143 (2004)

    Article  Google Scholar 

  13. Schärli, N., Ducasse, S., Nierstrasz, O., Black, A.: Traits: Composable Units of Behavior. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 248–274. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  14. Stroustrup, B.: The C++ Programming Language. Addison Wesley, Reading (2000)

    Google Scholar 

  15. Thomas, D., Hunt, A.: Programming Ruby: The Pragmatic Programmer’s Guide. Addison-Wesley, Reading (2001)

    Google Scholar 

  16. Zendra, O., Colnet, D., Collin, S.: Efficient Dynamic Dispatch without Virtual Function Tables. The SmallEiffel Compiler. In: OOPSLA 1997, 12th ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 125–141 (1997)

    Google Scholar 

  17. Zendra, O., Colnet, D.: Coping with aliasing in the GNU Eiffel Compiler implementation. Software Practice and Experience (SP&E) 31(6), 601–613 (2001)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Colnet, D., Marpons, G., Merizen, F. (2006). Reconciling Subtyping and Code Reuse in Object-Oriented Languages: Using inherit and insert in SmartEiffel, the GNU Eiffel Compiler. In: Morisio, M. (eds) Reuse of Off-the-Shelf Components. ICSR 2006. Lecture Notes in Computer Science, vol 4039. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11763864_15

Download citation

  • DOI: https://doi.org/10.1007/11763864_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-34606-7

  • Online ISBN: 978-3-540-34607-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics