Skip to main content

Go Model and Object Oriented Programming

  • Conference paper
  • First Online:
Book cover Programming Languages (SBLP 2015)

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

Included in the following conference series:

Abstract

Go is a contemporary language aiming to support OO programming where the core OO feature, inheritance, is intentionally excluded. Go uses the concepts of embedding and interface to provide its object model. To understand the design of Go and its consequences, we develop a simple Go-like model language, mini-Go, which abstracts Go’s interface-based OO features. The formal defined type system and semantics are given. In addition, we propose an even simpler language \(\mu \)Go where the feature of pointers is further removed. We demonstrate that \(\mu \)Go is as expressive in OO as the original language with pointers, which provides a uniform model for Go-like OO programming. We investigate the OO model of the Go-like languages using \(\mu \)Go in detail, point out that the absence of open recursion brings difficulties in OO design, and then propose a novel design pattern to mimic the open recursion feature to overcome the difficulties.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Pearson Education, Upper Saddle River (1994)

    MATH  Google Scholar 

  2. Tempero, E., Boyland, J., Melton, H.: How do Java programs use inheritance? an empirical study of inheritance in Java software. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 667–691. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  3. The Go Authors: The Go Programming Language Specification, 1.4.2 edn., November 2014

    Google Scholar 

  4. Pike, R.: Go at Google: Language design in the service of software engineering

    Google Scholar 

  5. The Go Authors: The Go Programming Language: FAQ, 1.4.2 edn., November 2014

    Google Scholar 

  6. Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)

    MATH  Google Scholar 

  7. Liu, H., Qiu, Z.: Go model and object oriented programming. Technical report, School of Mathematical Science, Peking University (2015)

    Google Scholar 

  8. Plotkin, G.D.: A structural approach to operational semantics. J. Log. Algebraic Program. 60–61, 17–139 (2004)

    MathSciNet  MATH  Google Scholar 

  9. Schmager, F., Cameron, N., Noble, J.: GoHotDraw: evaluating the Go programming language with design patterns. In: Evaluation and Usability of Programming Languages and Tools, p. 10. ACM (2010)

    Google Scholar 

  10. Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)

    Article  Google Scholar 

  11. Bierman, G.M., Parkinson, M.J., Pitts, A.M.: MJ: an imperative core calculus for Java and Java with effects. Technical report 563, University of Cambridge Computer Laboratory, April 2003

    Google Scholar 

  12. Cook, W.R., Hill, W., Canning, P.S.: Inheritance is not subtyping. In: Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1990, pp. 125–135. ACM, New York (1990)

    Google Scholar 

  13. Cook, W.R.: On understanding data abstraction, revisited. SIGPLAN Not. 44(10), 557–572 (2009)

    Article  Google Scholar 

  14. Viljamaa, P.: Client-specified self. In: Pattern Languages Of Program Design, pp. 495–504. ACM Press/Addison-Wesley Publishing Co., New York (1995)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Haiyang Liu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Liu, H., Qiu, Z. (2015). Go Model and Object Oriented Programming. In: Pardo, A., Swierstra, S. (eds) Programming Languages. SBLP 2015. Lecture Notes in Computer Science(), vol 9325. Springer, Cham. https://doi.org/10.1007/978-3-319-24012-1_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-24012-1_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-24011-4

  • Online ISBN: 978-3-319-24012-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics