2015 | OriginalPaper | Buchkapitel
Tipp
Weitere Kapitel dieses Buchs durch Wischen aufrufen
Erschienen in:
Programming Languages
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.
Bitte loggen Sie sich ein, um Zugang zu diesem Inhalt zu erhalten
Sie möchten Zugang zu diesem Inhalt erhalten? Dann informieren Sie sich jetzt über unsere Produkte:
Anzeige
1.
Zurück zum Zitat Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Pearson Education, Upper Saddle River (1994) MATH Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Pearson Education, Upper Saddle River (1994)
MATH
2.
Zurück zum Zitat 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) CrossRef 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)
CrossRef
3.
Zurück zum Zitat The Go Authors: The Go Programming Language Specification, 1.4.2 edn., November 2014 The Go Authors: The Go Programming Language Specification, 1.4.2 edn., November 2014
4.
Zurück zum Zitat Pike, R.: Go at Google: Language design in the service of software engineering Pike, R.: Go at Google: Language design in the service of software engineering
5.
Zurück zum Zitat The Go Authors: The Go Programming Language: FAQ, 1.4.2 edn., November 2014 The Go Authors: The Go Programming Language: FAQ, 1.4.2 edn., November 2014
6.
Zurück zum Zitat Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002) MATH Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
MATH
7.
Zurück zum Zitat Liu, H., Qiu, Z.: Go model and object oriented programming. Technical report, School of Mathematical Science, Peking University (2015) Liu, H., Qiu, Z.: Go model and object oriented programming. Technical report, School of Mathematical Science, Peking University (2015)
8.
Zurück zum Zitat Plotkin, G.D.: A structural approach to operational semantics. J. Log. Algebraic Program. 60–61, 17–139 (2004) MathSciNetMATH Plotkin, G.D.: A structural approach to operational semantics. J. Log. Algebraic Program.
60–61, 17–139 (2004)
MathSciNetMATH
9.
Zurück zum Zitat 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) 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)
10.
Zurück zum Zitat 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) CrossRef 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)
CrossRef
11.
Zurück zum Zitat 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 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
12.
Zurück zum Zitat 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) 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)
13.
Zurück zum Zitat Cook, W.R.: On understanding data abstraction, revisited. SIGPLAN Not. 44(10), 557–572 (2009) CrossRef Cook, W.R.: On understanding data abstraction, revisited. SIGPLAN Not.
44(10), 557–572 (2009)
CrossRef
14.
Zurück zum Zitat Viljamaa, P.: Client-specified self. In: Pattern Languages Of Program Design, pp. 495–504. ACM Press/Addison-Wesley Publishing Co., New York (1995) Viljamaa, P.: Client-specified self. In: Pattern Languages Of Program Design, pp. 495–504. ACM Press/Addison-Wesley Publishing Co., New York (1995)
- Titel
- Go Model and Object Oriented Programming
- DOI
- https://doi.org/10.1007/978-3-319-24012-1_5
- Autoren:
-
Haiyang Liu
Zongyan Qiu
- Sequenznummer
- 5