Abstract
We describe support for modularity in Newspeak, a programming language descended from Smalltalk [33] and Self [69]. Like Self, all computation — even an object’s own access to its internal structure — is performed by invoking methods on objects. However, like Smalltalk, Newspeak is class-based. Classes can be nested arbitrarily, as in Beta [44]. Since all names denote method invocations, all classes are virtual; in particular, superclasses are virtual, so all classes act as mixins. Unlike its predecessors, there is no static state in Newspeak, nor is there a global namespace. Modularity in Newspeak is based exclusively on class nesting. There are no separate modularity constructs such as packages. Top level classes act as module definitions, which are independent, immutable, self-contained parametric namespaces. They can be instantiated into modules which may be stateful and mutually recursive.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Java module system, Java Community Process JSR 277, now defunct, described, http://jcp.org/en/jsr/detail?id=277
Java on Guice: Guice user’s guide, http://code.google.com/p/google-guice/
OpenJDK project Jigsaw, http://openjdk.java.net/projects/jigsaw
OSGi service platform specification, release 4.2, http://www.osgi.org
Securable modules proposal for Javascript, https://wiki.mozilla.org/ServerJS/Modules/SecurableModules
Allen, E., Chase, D., Luchangco, V., Maessen, J.W., Ryu, S., Steele, G., Tobin-Hochstadt, S.: The Fortress language specification (2005), http://research.sun.com/projects/plrg/
Ancona, D., Fagorzi, S., Moggi, E., Zucca, E.: Mixin modules and computational effects. In: Goos, G., Hartmanis, J., van Leeuwen, J. (eds.) ICALP 2003. LNCS, vol. 2719, pp. 224–238. Springer, Heidelberg (2003)
Ancona, D., Zucca, E.: A calculus of module systems. Journ. of Functional Programming 12(2), 91–132 (2002), http://www.disi.unige.it/person/AnconaD/Software/Java/CMS.html
Aracic, I., Gasiunas, V., Mezini, M., Ostermann, K.: Overview of CaesarJ. In: Rashid, A., Aksit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 135–173. Springer, Heidelberg (2006), http://www.daimi.au.dk/~ko/papers/overview-of-caesarj-2005.pdf
Awad, I.: Module identification and loading for Javascript, http://docs.google.com/Doc?id=dfgxb7gk61d47876fr
Baldwin, C.Y., Clark, K.B.: Design Rules: The Power of Modularity. MIT Press, Cambridge (2000)
Bergel, A., Ducasse, S., Nierstrasz, O., Wuyts, R.: Classboxes: controlling visibility of class extensions. Computer Languages, Systems & Structures 31 (October 2005)
Bracha, G.: Objects as software services. In: Invited talk at OOPSLA (2005), Dynamic Languages Symposium (2005), http://video.google.com/videoplay?docid=-162051834912297779 , http://bracha.org/objectsAsSoftwareServices.pdf Unpublished manuscript
Bracha, G.: The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. Ph.D. thesis, University of Utah (1992)
Bracha, G.: Pluggable type systems. In: OOPSLA Workshop on Revival of Dynamic Languages (October 2004), http://pico.vub.ac.be/%7Ewdmeuter/RDL04/papers/Bracha.pdf
Bracha, G.: The Newspeak programming language specification, version 0.05 (2009), http://bracha.org/newspeak-spec.pdf
Bracha, G., Cook, W.: Mixin-based inheritance. In: Proc. of the Joint ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications and the European Conference on Object-Oriented Programming (October 1990)
Bracha, G., Ungar, D.: Mirrors: Design principles for meta-level facilities of object-oriented programming languages. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (October 2004)
Bykov, V.: Hopscotch: Towards user interface composition. In: ECOOP 2008 International Workshop on Advanced Software Development Tools and Techniques (WASDeTT) (July 2008)
Clarke, D., Drossopoulou, S., Noble, J., Wrigstad, T.: Tribe: a simple virtual class calculus. In: AOSD 2007: Proceedings of the 6th international conference on Aspect-oriented software development, pp. 121–134. ACM Press, New York (2007)
Corwin, J., Bacon, D.F., Grove, D., Murthy, C.: MJ: a rational module system for java and its applications. In: OOPSLA 2003: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pp. 241–254. ACM, New York (2003)
van Cutsem, T.: Ambient References: Object Designation in Mobile Ad Hoc Networks. Ph.D. thesis, Vrije Universiteit Brussel (2008)
Dreyer, D., Crary, K., Harper, R.: A type system for higher-order modules. In: POPL 2003: Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 236–249. ACM, New York (2003)
Dreyer, D., Rossberg, A.: Mixin’ up the ML module system. In: Proc. of the ACM SIGPLAN International Conference on Functional Programming (2008)
Duggan, D., Techaubol, C.C.: Modular mixin-based inheritance for application frameworks. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (2001)
Ernst, E.: gbeta – a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. Ph.D. thesis, Department of Computer Science, University of Aarhus, Århus, Denmark (1999)
Ernst, E.: Propagating class and method combination. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 67–91. Springer, Heidelberg (1999)
Ernst, E.: Higher-order hierarchies. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 303–329. Springer, Heidelberg (2003)
Ernst, E., Ostermann, K., Cook, W.R.: A virtual class calculus. In: Proc. of the ACM Symp. on Principles of Programming Languages (2006)
Findler, R.B., Flatt, M.: Modular object-oriented programming with units and mixins. In: Proc. of the ACM SIGPLAN International Conference on Functional Programming, pp. 94–104 (1998)
Flatt, M., Felleisen, M.: Units: Cool modules for HOT languages. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 236–248 (1998)
Gasiunas, V., Mezini, M., Ostermann, K.: Dependent classes. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2007). ACM Press, New York (2007), http://www.daimi.au.dk/~ko/papers/depcls-oopsla07.pdf
Goldberg, A., Robson, D.: Smalltalk-80: the Language and Its Implementation. Addison-Wesley, Reading (1983)
Gong, L., Ellison, G., Dageforde, M.: Inside Java(TM) 2 Platform Security: Architecture, API Design, and Implementation, 2nd edn. Addison-Wesley, Reading (2003)
Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 3rd edn. Addison-Wesley, Reading (2005)
Knudsen, J.L., Lofgren, M., Madsen, O.L., Magnusson, B.: Object-oriented environments: The Mjolner approach. Prentice-Hall, Englewood Cliffs (1994)
Leroy, X.: A proposal for recursive modules in Objective Caml, http://caml.inria.fr/pub/papers/xleroy-recursive_modules-03.pdf
Liang, S., Bracha, G.: Dynamic class loading in the Java virtual machine. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (1998)
Liu, Y.D., Smith, S.: Interaction-based programming with classages. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (2005)
Liu, Y.D., Smith, S.: A formal framework for component deployment. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (2006)
MacQueen, D.: Modules for Standard ML. In: Proc. of the ACM Conf. on Lisp and Functional Programming, pp. 198–207 (August 1984)
Madsen, O.L.: Semantic analysis of virtual classes and nested classes. In: OOPSLA 1999: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 114–131. ACM, New York (1999)
Madsen, O.L., Møller-Pedersen, B.: Virtual classes: A powerful mechanism in object-oriented programming. In: Proceedings OOPSLA 1989, ACM SIGPLAN Notices, pp. 397–406 (October 1989); published as Proceedings OOPSLA 1989, ACM SIGPLAN Notices, vol. 24(10) (1989)
Madsen, O.L., Møller-Pedersen, B., Nygaard, K.: Object-Oriented Programming in the Beta Programming Language. Addison-Wesley, Reading (1993)
McDirmid, S., Flatt, M., Hsieh, W.: Jiazzi: New age components for old fashioned java. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (2001)
Mettler, A., Wagner, D.: The Joe-E language specification, version 1.0. Tech. Rep. UCB/EECS-2008-91, University of California at Berkeley (2008), http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-91.pdf
Miller, M.S.: Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. Ph.D. thesis, Johns Hopkins University, Baltimore, Maryland, USA (May 2006)
Miranda, E.: Newspeak FFI internal documentation, http://wiki.squeak.org/squeak/uploads/6100/Alien%20FFI.pdf
Mostinckx, S., Van Cutsem, T., Timbermont, S., Tanter, E.: Mirages: behavioral intercession in a mirror-based architecture. In: DLS 2007: Proceedings of the 2007 symposium on Dynamic languages, pp. 89–100. ACM, New York (2007)
Nakata, K., Garrigue, J.: Recursive modules for programming. In: ICFP 2006: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, pp. 74–86. ACM, New York (2006)
Nystrom, N., Qi, X., Myers, A.C.: J&: Software composition with nested intersection. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (2006)
Nystrom, N.J.: Programming Languages for Scalable Software Extension and Composition. Ph.D. thesis, Dept. of Computer Science, Cornell University (2007)
Odersky, M., Spoon, L., Venners, B.: Programming in Scala. Artima Press, Mountain View (2008)
Odersky, M., Zenger, M.: Scalable component abstractions. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications, pp. 41–57 (2005)
Ossher, H., Harrison, W.: Combination of inheritance hierarchies. In: Proceedings OOPSLA 1992, ACM SIGPLAN Notices, pp. 25–40 (October 1992); published as Proceedings OOPSLA 1992, ACM SIGPLAN Notices, vol. 27(10) (1992)
Ramsey, N., Fisher, K., Govereau, P.: An expressive language of signatures. In: ICFP 2005: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming, pp. 27–40. ACM, New York (2005)
Rinat, R., Smith, S.: Modular internet programming with cells. In: European Conference on Object-Oriented Programming (2002)
Russo, C.V.: Recursive structures for standard ML. In: ICFP 2001: Proceedings of the sixth ACM SIGPLAN international conference on Functional programming, pp. 50–61. ACM, New York (2001)
Schmidt, R.W.: Metabeta: Model and implementation. Tech. rep., Department of Computer Science, Aarhus University (April 1996)
Smaragdakis, Y., Batory, D.: Mixin layers: A object-oriented implementation technique for refinements and collaboration-based designs. ACM Transactions on Software Engineering and Methodlogies (2002)
Smith, M., Drossopoulou, S.: Inner Classes visit Aliasing. In: ECOOP Workshop on Formal Techniques for Java Programs (FTfJP 2003) (2003), http://www.cs.kun.nl/~erikpoll/ftfjp/2003.html
Smith, W.R.: NewtonScript: Prototypes on the Palm, pp. 109–139. Springer, Heidelberg (1999); In: Taivalsaari and Moore, editors, Prototype-Based Programming: Concepts, Languages and Applications, Noble
Stiegler, M.: E in a walnut (2000), http://www.skyhunter.com/marcs/ewalnut.html , http://www.erights.org/
Szyperski, C.A.: Import is not inheritance – why we need both: Modules and classes. In: Madsen, O.L. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 19–32. Springer, Heidelberg (1992)
Szyperski, C.A.: Component Software: Beyond Object-Oriented Programming, 2nd edn. Addison-Wesley, Reading (2002)
Thorup, K.K.: Genericity in Java with virtual types. In: European Conference on Object-Oriented Programming, pp. 444–471 (1997)
Thorup, K.K., Torgersen, M.: Unifying genericity: Combining the benefits of virtual types and parameterized classes. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 186–204. Springer, Heidelberg (1999)
Ungar, D.: Annotating objects for transport to other worlds. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (October 1995)
Ungar, D., Smith, R.: SELF: The power of simplicity. In: Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (October 1987)
Zenger, M.: Type-safe prototype-based component evolution. In: European Conference on Object-Oriented Programming (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bracha, G., von der Ahé, P., Bykov, V., Kashai, Y., Maddox, W., Miranda, E. (2010). Modules as Objects in Newspeak. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_20
Download citation
DOI: https://doi.org/10.1007/978-3-642-14107-2_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14106-5
Online ISBN: 978-3-642-14107-2
eBook Packages: Computer ScienceComputer Science (R0)