acmarthould only be used to provide space above/below
EOLANG and -calculus
Abstract.
Object-oriented programming (OOP) is one of the most popular paradigms used for building software systems111LATEX sources of this paper are maintained in objectionary/eo GitHub repository, the rendered version is .. However, despite its industrial and academic popularity, OOP is still missing a formal apparatus similar to -calculus, which functional programming is based on. There were a number of attempts to formalize OOP, but none of them managed to cover all the features available in modern OO programming languages, such as C++ or Java. We have made yet another attempt and created -calculus. We also created EOLANG (also called EO), an experimental programming language based on -calculus.
1. Introduction
It is difficult to define what exactly is OOP, as āthe term has been used to mean different things,ā according toĀ Stefik and Bobrow (1985). Madsen and MĆøller-Pedersen (1988) claimed that āthere are as many definitions of OOP as there papers and books on the topic.ā Armstrong (2006) made a noticeable observation: āWhen reviewing the body of work on OO development, most authors simply suggest a set of concepts that characterize OO, and move on with their research or discussion. Thus, they are either taking for granted that the concepts are known or implicitly acknowledging that a universal set of concepts does not exist.ā
1.1. Lack of Formal Model
The term OOP was coined byĀ Kay (1997) in 1966 and since then was never introduced formallyĀ (Kay, 1986). Back in 1982, Rentsch (1982) predicted: āEveryone will be in a favor of OOP. Every manufacturer will promote his products as supporting it. Every manager will pay lip service to it. Every programmer will practice it (differently). And no one will know just what it is.ā
There is a fundamental problem in OOPāthe lack of a rigorous formal model, as was recapped byĀ Eden and Hirshfeld (2001): āUnfortunately, architectural formalisms have largely ignored the OO idiosyncrasies. Few works recognized the elementary building blocks of design and architecture patterns. As a result of this oversight, any attempt to use formalisms for the specification of OO architectures is destined to neglect key regularities in their organization.ā
There is no uniformity or an agreement on the set of features and mechanisms that belong in an OO language as āthe paradigm itself is far too general,ā as was concluded byĀ Nierstrasz (1989) in his survey.
OO and semi-OO programming languages treat OOP differently and have variety of different features to follow the concept of object-orientedness. For example, Java has classes and types (interfaces) but doesnāt have multiple inheritanceĀ (Alpern etĀ al., 2001), C++ has multiple inheritance but doesnāt directly support mixinsĀ (Burton and Sekerinski, 2014), Ruby and PHP donāt have generics and types, but have traitsĀ (Bi and Oliveira, 2018), JavaScript doesnāt have classes, but has prototypesĀ (Richards etĀ al., 2010), and so on.
It was noted by Danforth and Tomlinson (1988) that object-oriented programming, like functional programming or logic programming, incorporates a metaphor in which computation is viewed in terms divorced from the details of actual computation. However, in the case of OOP, this metaphor is rarely introduced with the mathematical precision available to the functional or logic programming models. Rather, OOP is generally expressed in philosophical terms, resulting in a natural proliferation of opinions concerning exactly what OOP really is.
1.2. Complaints of Programmers
Although the history of OOP goes back for more than 50 years to the development of SimulaĀ (Dahl and Nygaard, 1966), OOP is under heavy criticism since the beginning to nowadays, mostly for its inability to solve the problem of software complexity.
According toĀ Graham (2004), āsomehow the idea of reusability got attached to OOP in the 1980s, and no amount of evidence to the contrary seems to be able to shake it free,ā while āOOP offers a sustainable way to write spaghetti code.ā West (2004) argues that the contemporary mainstream understanding of objects (which is not behavioral) is ābut a pale shadow of the original ideaā and āanti-ethical to the original intent.ā Gosling and McGilton (1995) notes that āunfortunately, āobject orientedā remains misunderstood and over-marketed as the silver bullet that will solve all our software ills.ā
1.3. High Complexity
Nierstrasz (2010) said that āOOP is about taming complexity through modeling, but we have not mastered this yet.ā Readability and complexity issues of OO code remain unsolved till today. Shelly (2015) claimed that āReading an OO code you canāt see the big picture and it is often impossible to review all the small functions that call the one function that you modified.ā Khanam (2018) in a like manner affirmed: āObject oriented programming promotes ease in designing reusable software but the long coded methods makes it unreadable and enhances the complexity of the methods.ā
The complexity of OO software is higher than the industry would expect, taking into account the amount of efforts invested into the development of OO languages. As was concluded byĀ Bosch (1997), āOO frameworks have number of problems that complicate development, usage, composition and maintenance of software.ā
For example, the infamous legacy code has its additional overhead associated with OO languagesāinheritance mechanism, which āallows you to write less code at the cost of less readability,ā as explained byĀ Carter (1997). It is not infrequently when āinheritance is overused and misused,ā which leads to āincreased complexity of the code and its maintenance,ā as noted byĀ Bernstein (2016).
The lack of formalism encouraged OOP language creators to invent and implement language features, often known as āsyntax sugar,ā which are convenient for some of them in some special cases but jeopardize the consistency of design when being used too often and by less mature programmers. The most obvious outcome of design inconsistencies is high complexity due to low readability, which negatively affects the quality and leads to functionality defects.
1.4. Solution Proposed
EO222https://www.eolang.org was created in order to eliminate the problem of complexity of OOP code, providing 1) a formal object calculus and 2) a programming language with a reduced set of features. The proposed -calculus represents an object model through data and objects, while operations with them are possible through formation, application, and decoration. The calculus introduces a formal apparatus for manipulations with objects.
EO, the proposed programming language, fully implements all elements of the calculus and enables implementation of an object model on any computational platform. Being an OO programming language, EO enables four key principles of OOP: abstraction, inheritance, polymorphism, and encapsulation.
The following four principles stay behind the apparatus we introduce:
-
ā¢
An object is a collection of attributes, which are uniquely named bindings to objects. An object is an atom if its implementation is provided by the runtime.
-
ā¢
An object is abstract if at least one of its attributes is voidāisnāt attached to any object. An object is closed otherwise. Formation is the process of creating a objects. Application is the process of making a copy of existing object, specifying some or all of its void attributes with objects known as arguments. Application may lead to the creation of a closed object, or an abstract one, if not all void attributes are specified with arguments.
-
ā¢
An object may decorate another object by binding it to the attribute of itself. A decorator has its own attributes and attached attributes of its decoratee.
-
ā¢
A special attribute may be attached to data, which is a computation platform dependable entity not decomposable any further. Dataization is a process of retrieving data from an object, by taking what the attribute is attached to. The dataization of an object at the highest level of composition leads to the execution of a program.
The rest of the paper is dedicated to the discussion of the syntax of the language that we created based on the calculus, the calculus itself, its semantics, and pragmatics. In order to make it easier to understand, we start the discussion with the syntax of the language, while the calculus is derived from it. Then, we discuss the key features of EO and the differences between it and other programming languages. We also discuss how the absence of traditional OOP features, such as mutability or inheritance, affect the complexity of code. At the end of the paper we overview the work done by others in the area of formalization of OOP.
2. Syntax
The entire syntax of EO language in BNF is available on the first page of the objectionary/eo Github repository333https://github.com/objectionary/eo. Similar to PythonĀ (Lutz, 2013), indentation in EO is part of the syntax: the scope of a code block is determined by its horizontal position in relation to other blocks, which is also known as āoff-side ruleāĀ (Landin, 1966).
There are no keywords in EO but only a few special symbols denoting grammar constructs: for the attributes naming, for the dot notation, for the specification of parameters of formations, for scope limitations, for turning objects into constants, for naming arguments, (double quotes) for string literals, for the decoratee, (apostroph) for explicit copying, for object identity, for referring to the parent object, for referring to the home object, and for referring to the current object. Attributes, which are the only identifiers that exist in EO, may have any Unicode symbols in their names, as long as they start with a small English letter and donāt contain spaces, line breaks, or special symbols mentioned above: and are valid identifiers. Identifiers are case-sentitive: and are two different identifiers. Java-notation is used for numbers and strings.
2.1. Identity, State, and Behavior
According toĀ Booch etĀ al. (2007), an object in OOP has state, behavior, and identity: āThe state of an object encompasses all of the properties of the object plus the current values of each of these properties. Behavior is how an object acts and reacts, in terms of its state changes and message passing. Identity is that property of an object which distinguishes it from all other objects.ā The syntax of EO makes a difference between these three categories.
This is a formation of a new object , which has a single identity attribute :
To make another object with a specific ISBN, the has to be copied, with the data as an argument:
Here, is a new object created. Its only attribute is accessible as .
A similar abstract object, but with two new state attributes, would look like:
The attribute is a constant, while the represents a mutable chunk of bytes in computing memory. They both are accessible similar to the , via and . It is legal to access them in the abstract object, since they are attached to objects. However, accessing will lead to an error, since the attribute is void in the abstract object .
A behavior may be added to an object with a new inner abstract object :
The price of the book may be changed with this one-liner:
2.2. Indentation
This is an example of an abstract object , where spaces are replaced with the āā£ā symbol in order to demonstrate the importance of their presence in specific quantity (for example, there has to be exactly one space after the closing square bracket at the second line and the symbol, while two spaces will break the syntax):
The code at the line no.Ā LABEL:ln:comment is a comment. Two void attributes and are listed in square brackets at the line no.Ā 4. The name of the object goes after the symbol. The code at the line no.Ā 5 defines an attached attribute . Anywhere when an object has to get a name, the symbol can be added after the object.
The declaration of the attribute at the linesĀ 5ā8 can be written in one line, using dot notation:
An inverse dot notation is used in order to simplify the syntax. The identifier that goes after the dot is written first, the dot follows, and the next line contains the part that is supposed to stay before the dot. It is also possible to rewrite this expression in multiple lines without the usage of inverse notation, but it will look less readable:
Here, the line no.Ā LABEL:ln:dx-pow is the application of the object with a new argument . Then, the next line is the object taken from the object created at the first line, using the dot notation. Then, the line no.Ā 9 is the argument passed to the object . The code at the line no.Ā 10 takes the object from the object constructed at the previous line, and gives it the name .
Indentation is used for two purposes: either to define attributes of an abstract object or to specify arguments for object application, also known as making a copy. A definition of an abstract object starts with a list of void attributes in square brackets on one line, followed by a list of attached attributes each in its own line. For example, this is an abstract anonymous object (it doesnāt have a name) with one void attribute and two attached attributes and :
The arguments of and are provided in a horizontal mode, without the use of indentation. It is possible to rewrite this code in a vertical mode, where indentation will be required:
This abstract object can also be written in a horizontal mode, because it is anonymous:
2.3. EO to XML
Due to the nesting nature of EO, its program can be transformed to an XML document. The abstract object would produce this XML tree of elements and attributes:
Each object is represented by an XML element with a few optional attributes, such as and . Each attribute is either a named reference to an object (if the attribute is attached, such as ), or a name without a reference (if it is void, such as and ).
2.4. Data Objects and Tuples
There are a few abstract objects which canāt be directly copied, such as and . They are created by the compiler when it meets a special syntax for data, for example:
This syntax would be translated to XMIR (XML based data format):
Each object, if it is not a formation, has a ābaseā attribute in XML, which contains that name of a formation to be copied. The examples of some possible data objects are inĀ TableĀ 1.
Data |
Example |
Size |
---|---|---|
|
4 | |
|
16 | |
or |
2 | |
, , or |
8 | |
or |
8 | |
or |
1 |
The syntax of all data with examples. The āSizeā column denotes the number of bytes in the attribute. UTF-8 is the encoding used in object.
The is yet another data, which canāt be copied directly. There is a special syntax for making tuples, which looks similar to object copying:
2.5. Scope Brackets
Brackets can be used to group object arguments in horizontal mode:
The is a copy of the abstract object with two arguments and . This object is itself the first argument of the copy of the object . Its second argument is . Without brackets the syntax would read differently:
This expression denotes a copy of with four arguments.
2.6. Inner Objects
An abstract object may have other abstract objects as its attributes, for example:
The object has two void attributes and and the attribute , which is attached to an abstract object with one void attribute and one attached attribute . The inner abstract object may only be copied with a reference to its parent object , via a special attribute denoted by the symbol:
The parent object is , while the object is the argument for the void attribute of the object . Suffixes , , and are optional and may be used to denote the exact name of the void attribute to be attached to the provided argument.
2.7. Decorators
An object may extend another object by decorating it:
The object has a special attribute at the line no.Ā 39, which denotes the decoratee: an object to be extended, also referred to as ācomponentā byĀ Gamma etĀ al. (1994).
The decorator has the same attributes as its decoratee , but also its own attribute . The attribute may be used the same way as other attributes, including in dot notation, as it is done at the line no.Ā 42. However, this line may be re-written in a more compact way, omitting the explicit reference to the attribute, because all attributes of the are present in the ; and omitting the reference to because the default scope of visibility of is the object :
The inner object also has the attribute: it decorates the object (stands for āless than equalā). The expression at the line no.Ā 42 means: take the parent object of , take the attribute from it, then take the inner object from there, and then make a copy of it with the attribute taken from the current object (denoted by the symbol).
The object may be used like this, to understand whether the point is inside the circle at with the radius :
Here, will be a copy of behaving like because decorates .
It is also possible to make decoratee void, similar to other void attributes, specifying it in the list of void attributes in square brackets.
2.8. Anonymous Formations
A formation may be used as an argument of another object while making a copy of it, for example:
Here the object is copied with a single argument: the one-item tuple, which is a formation with a single void attribute . The will use this formation, which doesnāt have a name, in order to filter out files while traversing the tree of directories. It will make a copy of the formation and then treat it as a boolean value in order to make a decision about each file.
The syntax may be simplified and the formation may be inlined (the tuple is also inlined):
An anonymous formation may have multiple attributes:
This object has two attributes and , and doesnāt have a name.
The parent of each copy of the abstract object will be set by the object and will point to the object itself.
2.9. Constants
EO is a declarative language with lazy evaluations. This means that this code would read the input stream two times:
The object will go to the two times. First time, in order to use it as a substitute for and the second time for . There will be two round-trips to the standard input stream, which obviously is not correct. The exclamation mark at the solves the problem, making the object by the name a constant. This means that all attributes of are cached. Important to notice that the cache is not deep: the attributes of attributes are not cached.
Here, is an attribute of the object , even though it is not defined as explicitly as . Anywhere a new name shows up after the symbol, it is a declaration of a new attribute in the nearest object abstraction.
2.10. Explicit Shallow Copies
There may be a need to make a copy of an object without giving any parameters to it. This may be done with an apostrophe suffix:
Here, two objects will be created, and , where the former is an abstract one, a copy of , while the later is a closed one with two parameters specified. The apostrophe suffix may be used anywhere after the name of an object, for example:
Making a copy of will not lead to making a copy of , which is encapsulated by .
2.11. Object Identity
Each object has a special attribute , which is an integer refering to a unique identifier of an object in the entire runtime scope of a program. All of the following expressions are true:
All of the following expressions are false:
2.12. Metas and License
A program may have a comment at the beginning of the file, which is called a license. The license may be followed by an optional list of meta statements, which are passed to the compiler as is. The meaning of them depends on the compiler and may vary between target platforms. This program instructs the compiler to put all objects from the file into the package and helps it resolve the name , which is external to the file:
2.13. Atoms
Some objects in EO programs may need to be platform specific and canāt be composed from other existing objectsāthey are called atoms. For example, the object uses the object , which is an atom. Its implementation would be provided by the runtime. This is how the object may be defined:
The suffix informs the compiler that this object must not be compiled from EO to the target language. The object with this suffix already exists in the target language and most probably could be found in the library specified by the meta. The exact library to import has to be selected by the compiler. In the example above, there are two libraries specified: for JVM and for Ruby.
The part after the is the name of object, which decorates. The name may be replaced by a question mark, if uncertain about the object being decorated.
Atoms in EO are similar to ānativeā methods in Java and āexternā methods in C#: this mechanism is also known as foreign function interface (FFI).
2.14. Home Object
An instance of an abstact object may need to have access to the object where the abstract was defined, for example this is how object is implemented in Objectionary:
The object at the line no.Ā 22 is an atom: it iterates through list of items and makes a copy of the provided two-arguments abstract object applying the next item to it and the index in the tuple (that is why the name with the āiā suffix).
The object does exactly the same, but doesnāt provide the index of each element to the inner abstract object. The anonymous inner abstract object at the line no.Ā 25 has to get access to the attribute of . However, wonāt work, because the parent of it is a copy of , and the parent of is the object . Thus, there is no way to get access to using parent attributes.
The home attribute helps here. Once an abstract object at the line no.Ā 25 is created, its home attribute is set to the abstract object at the line no.Ā LABEL:ln:list-parent. Its parent attribute is also set to the object , but is later changed by the atom when a copy of it is being made. However, the home attribute remains the same.
3. Calculus
The proposed -calculus is based on set theoryĀ (Jech, 2013) and lambda calculus, representing objects as sets of pairs and their internals as -terms. The rest of the section contains formal definitions of data, objects, attributes, formation, application, decoration, and dataization.
3.1. Objects and Data
Definition 3.1 ().
An object is a set of ordered pairs such that is an identifier, all are different, and is an object.
An identifier is either , , , , or, by convention, a text without spaces starting with a small-case English letter in typewriter font.
The object at the line no.Ā LABEL:ln:book may be represented as
(1) |
where is an identifier and is an empty set, which is a proper object, according toĀ DefinitionĀ 3.1.
Definition 3.2 ().
An object may have properties of data, which is a computation platform dependable entity and is not decomposable any further within the scope of -calculus.
What exactly is data may depend on the implementation platform, but most certainly would include byte arrays, integers, floating-point numbers, string literals, and boolean values.
The object at the linesĀ LABEL:ln:book2ā2 may be represented as
(2) |
where , , and are identifiers, is an object defined somewhere else, and the text in double quotes is data.
3.2. Attributes
Definition 3.3 ().
In an object , is a void attribute with the name iff ; it is an attached attribute with the value iff and ;
In Eq.Ā 2, identifiers , , and are the attributes of the object . The attribute is void, while the other two are attached.
Definition 3.4 ().
If is an object and , then may be referenced as ; this referencing mechanism is called dot notation.
Both void and attached attributes of an object are accessible using the dot notation. There is no such thing as visibility restriction in -calculus: all attributes are visible to all objects outside of the one they belong to.
It is possible to chain attribute references using dot notation, for example is a valid expression, which means ātaking the attribute from the object and then taking the attribute from it.ā
Definition 3.5 ().
If is an object, then , a set consisting of all , is its scope and the cardinality of is the arity of .
For example, the scope of the object atĀ Eq.Ā 2 consists of three identifiers: , , and .
3.3. Formation
Definition 3.6 ().
An object is abstract iff at least one of its attributes is void, i.e. .
An alternative āarrow notationā may be used to denote an object in a more compact way, where void attributes stay in the parentheses on the left side of the mapping symbol and pairs, which represent attached attributes, stay on the right side, in double-square brackets. EquationĀ 2 may be written as
(3) |
3.4. Application
Definition 3.7 ().
If is an abstract object and is an object where , then an application of to is a copy of , a new object that consists of pairs such that if and otherwise.
Application makes some void attributes of attachedāby binding objects to them. The produced object has exactly the same set of attributes, but some of them, which were void before, become attached.
It is not expected that all void attributes turn into attached ones during application. Some of them may remain void, which will lead to creating a new abstract object. To the contrary, if all void attributes are substituted with arguments during copying, a newly created object will be closed.
Once set, attached attributes may not be reset. This may be interpreted as immutability property of objects.
Arrow notation may also be used to denote object copying, where the names of the attributes, which remain void, stay in the brackets on the left side of the mapping symbol , while objects provided as arguments stay on the right side, in the brackets. For example, the object at the line no.Ā LABEL:ln:point-copy may be written as
(4) |
and may further be simplified since the order of parameters is obvious:
(5) |
An application without arguments is a copy of an object. For example, in these expressions the attribute is attached to the same object as the attribute , while the attribute is attached to a new object, a copy of :
3.5. Formation
Definition 3.8 ().
The process of creating an object that is not a copy of another object is called formation.
3.6. Parent and Home
Definition 3.9 ().
If is an object, then is its parent, which is the object that created .
An object may be created either by abstraction or application. In case of abstraction, an object is created by another abstract object, for example:
(6) |
In case of application, an object is created by the prepending object:
(7) |
Definition 3.10 ().
If is an object, then is its home object, which is the of the abstract object is a copy of.
For example:
(8) |
3.7. Decoration
Definition 3.11 ().
If and are objects and , then if ; this means that is decorating .
Here, is a special identifier denoting the object, known as a decoratee, being decorated within the scope of the decorator.
For example, the object at the linesĀ LABEL:ln:circleā43 would be denoted by this formula:
(9) |
while the application of it would look like:
(10) |
producing:
(11) |
Because of decoration, the expression in Eq.Ā 9 is semantically equivalent to a shorter expression in Eq.Ā 11.
The following expression makes a new object , which represents a sequence of object applications ending with a copy of :
(12) |
producing:
(13) |
It is important to notice that attributes of a decoratee donāt belong to the scope of its decorator.
3.8. Atoms
Definition 3.12 ().
If is a function of one argument returning an object, then it is an abstract object called an atom, is its -term, and is its void attribute.
Atoms may have their -terms defined outside of -calculus formal scope. For example, the object at the line no.Ā 51 would be denoted as
(14) |
where is a -term defined externally.
In atoms, -terms are attached to attribute. Thus, a more formal form of the Eq.Ā 14 is:
3.9. Constant
Definition 3.13 ().
If is an object then is a constant attribute, meaning that the result of dataization of always equals to itself.
3.10. Identity
Definition 3.14 ().
If is an object then is a positive integer data object with a unique identity of in the entire runtime scope.
For example, without any other objects in scope it is safe to assume the following, however there is no guarantee that the actual numbers will be the same in all implementations:
(15) |
4. Key Features
There are a few features that distinguish EO and -calculus from other existing OO languages and object theories, while some of them are similar to what other languages have to offer. The Section is not intended to present the features formally, which was done earlier in SectionsĀ 3 andĀ 2, but to compare EO with other programming languages and informally identify similarities.
No Classes.ā EO is similar to other delegation-based languages like SelfĀ (Ungar etĀ al., 1987), where objects are not created by a class as in class-based languages like C++ or Java, but from another object, inheriting properties from the original. However, while in such languages, according toĀ Fisher and Mitchell (1995), āan object may be created, and then have new methods added or existing methods redefined,ā in EO such object alteration is not allowed.
No Types.ā Even though there are no types in EO, compatibility between objects may be inferred in compile-time and validated strictly, which other typeless languages such as Python, JuliaĀ (Bezanson etĀ al., 2012), LuaĀ (Ierusalimschy, 2016), or ErlangĀ (erl, 2020) canāt guarantee. Also, there is no type casting or reflection on types in EO.
No Inheritance.ā It is impossible to inherit attributes from another object in EO. The only two possible ways to re-use functionality are either via object composition or decorators. There are OO languages without implementation inheritance, for example GoĀ (Donovan and Kernighan, 2015), but only KotlinĀ (Jemerov and Isakova, 2017) has decorators as a language feature. In all other languages, the Decorator patternĀ (Gamma etĀ al., 1994) has to be implemented manuallyĀ (Bettini etĀ al., 2011).
No Methods.ā An object in EO is a composition of other objects and atoms: there are no methods or functions similar to Java or C++ ones. Execution control is given to a program when atomsā attributes are referred to. Atoms are implemented by EO runtime similar to Java native objects. To our knowledge, there are no other OO languages without methods.
No Constructors.ā Unlike Java or C++, EO doesnāt allow programmers to alter the process of object construction or suggest alternative paths of object instantiation via additional constructions. Instead, all arguments are attached to attributes āas isā and canāt be modified.
No Static Entities.ā Unlike Java and C#, EO objects may consist only of other objects, represented by attributes, while class methods, also known as static methods, as well as static literals, and static blocksādonāt exist in EO. Considering modern programming languages, Go has no static methods either, but only objects and āstructsāĀ (Schmager etĀ al., 2010).
No Primitive Data Types.ā There are no primitive data types in EO, which exist in Java and C++, for example. As in Ruby, SmalltalkĀ (Goldberg and Robson, 1983), Squeak, Self, and Pharo, integers, floating point numbers, boolean values, and strings are objects in EO: āeverything is an objectā is the key design principle, which, according toĀ West (2004, p.66), is an āobviously necessary prerequisite to object thinking.ā
No Operators.ā There are no operators like or in EO. Instead, numeric objects have built-in atoms that represent math operations. The same is true for all other manipulations with objects: they are provided only by their encapsulated objects, not by external language constructs, as in Java or C#. Here EO is similar to Ruby, Smalltalk and Eiffel, where operators are syntax sugar, while implementation is encapsulated in the objects.
No NULL References.ā Unlike C++ and Java, there is no concept of NULL in EO, which was called a ābillion dollar mistakeā byĀ Hoare (2009) and is one of the key threats for design consistencyĀ (Bugayenko, 2016). Haskell, Rust, OCaml, Standard ML, and Swift also donāt have NULL references.
No Empty Objects.ā Unlike Java, C++ and all other OO languages, empty objects with no attributes are forbidden in EO in order to guarantee the presence of object composition and enable separation of concernsĀ (Dijkstra, 1982): larger objects must always encapsulate smaller ones.
No Private Attributes.ā Similar to PythonĀ (Lutz, 2013) and SmalltalkĀ (Hunt, 1997), EO makes all object attributes publicly visible. There are no protected ones, because there is no implementation inheritance, which is considered harmfulĀ (Hunt, 2000). There are no private attributes either, because information hiding can anyway easily be violated via getters, and usually is, making the code longer and less readable, as explained byĀ Holub (2004).
No Global Scope.ā All objects in EO are attached to some attributes. Objects constructed in the global scope of visibility are attached to attributes of the object of the highest level of abstraction. Newspeak and Eiffel are two programming languages that does not have global scope as well.
No Mutability.ā Similar to ErlangĀ (Armstrong, 2010), there are only immutable objects in EO, meaning that their attributes may not be changed after the object is constructed or copied. Java, C#, and C++, have modifiers like , , or to make attributes immutable, which donāt mean constants though. While the latter will always expose the same functionality, the former may represent mutable entities, being known as read-only referencesĀ (Birka and Ernst, 2004). For example, an attribute may have an object attached to it, which is a random number generator. EO wonāt allow assigning another object to the attribute . However, every time the attribute is dataized, its value will be different. There are number of OOP languages that also prioritize immutability of objects. In RustĀ (Matsakis and Klock, 2014), for example, all variables are immutable by default, but can be made mutable via the modifier. Similarly, DĀ (Bright etĀ al., 2020) has qualifier , which expresses transitive immutability of data.
No Exceptions.ā In most OO languages exception handlingĀ (Goodenough, 1975): happens through an imperative error-throwing statement. Instead, EO has a declarative mechanism for it, which is similar to Null Object design patternĀ (Martin etĀ al., 1997): returning an abstract object causes program execution to stop once the returned object is dealt with.
No Functions.ā There are no lambda objects or functions in EO, which exist in JavaĀ 8+, for example. However, objects in EO have ābodies,ā which make it possible to interpret objects as functions. Strictly speaking, if objects in EO would only have bodies and no other attributes, they would be functions. It is legit to say that EO extends lambda calculus, but in a different way comparing to previous attempts made byĀ Mitchell etĀ al. (1993) and DiĀ Gianantonio etĀ al. (1998): methods and attributes in EO are not new concepts, but lower-level objects.
No mixins.ā There are no ātraitsā or āmixinsā inĀ EO, which exist in Ruby and PHP to enable code reuse from other objects without inheritance and composition.
5. Four Principles of OOP
In order to answer the question, whether the proposed object calculus is sufficient to express any object model, in this Section we demonstrate how four fundamental principles of OOP are realized by -calculus: encapsulation, abstraction, inheritance, and polymorphism.
5.1. Abstraction
Abstraction, which is called āmodularityā byĀ Booch etĀ al. (2007), is, according toĀ West (2004, p.203), āthe act of separating characteristics into the relevant and irrelevant to facilitate focusing on the relevant without distraction or undue complexity.ā While Stroustrup (1997) suggests C++ classes as instruments of abstraction, the ultimate goal of abstraction is decomposition, according toĀ West (2004, p.73): ācomposition is accomplished by applying abstractionāthe āknifeā used to carve our domain into discrete objects.ā
In -calculus objects are the elements the problem domain is decomposed into. This goes along the claim ofĀ West (2004, p.24): āobjects, as abstractions of entities in the real world, represent a particularly dense and cohesive clustering of information.ā
5.2. Inheritance
Inheritance, according toĀ Booch etĀ al. (2007), is āa relationship among classes wherein one class shares the structure and/or behavior defined in one (single inheritance) or more (multiple inheritance) other classes,ā where āa subclass typically augments or restricts the existing structure and behavior of its superclasses.ā The purpose of inheritance, according toĀ Meyer (1997), is āto control the resulting potential complexityā of the design by enabling code reuse.
Consider a classic case of behaviour extension, suggested byĀ Stroustrup (1997, p.38) to illustrate inheritance. C++ class represents a graphic object on the canvas (a simplified version of the original code):
The method is āvirtual,ā meaning that it is not implemented in the class but may be implemented in sub-classes, for example in the class :
The class inherits the behavior of the class and extends it with its own feature in the method . Now, when the method is called, its implementation from the class will call the virtual method , and the call will be dispatched to the overridden method through the āvirtual tableā in the class . The creator of the class is now aware of sub-classes which may be created long after, for example , , and so on.
Even though implementation inheritance and method overriding seem to be powerful mechanisms, they have been criticized. According toĀ Holub (2003), the main problem with implementation inheritance is that it introduces unnecessary coupling in the form of the āfragile base class problem,ā as was also formally demonstrated byĀ Mikhajlov and Sekerinski (1998).
The fragile base class problem is one of the reasons why there is no implementation inheritance in -calculus. Nevertheless, object hierarchies to enable code reuse in -calculus may be created using decorators. This mechanism is also known as ādelegationā and, according toĀ Booch etĀ al. (2007, p.98), is āan alternate approach to inheritance, in which objects delegate their behavior to related objects.ā As noted byĀ West (2004, p.139), delegation is āa way to extend or restrict the behavior of objects by composition rather than by inheritance.ā Seiter etĀ al. (1998) said that āinheritance breaks encapsulationā and suggested that delegation, which they called ādynamic inheritance,ā is a better way to add behavior to an object, but not to override existing behavior.
The absence of inheritance mechanism in -calculus doesnāt make it any weaker, since object hierarchies are available. Booch etĀ al. (2007) while naming four fundamental elements of object model mentioned āabstraction, encapsulation, modularity, and hierarchyā (instead of inheritance, like some other authors).
5.3. Polymorphism
According toĀ Meyer (1997, p.467), polymorphism means āthe ability to take several forms,ā specifically a variable āat run time having the ability to become attached to objects of different types, all controlled by the static declaration.ā Booch etĀ al. (2007, p.67) explains polymorphism as an ability of a single name (such as a variable declaration) āto denote objects of many different classes that are related by some common superclass,ā and calls it āthe most powerful feature of object-oriented programming languages.ā
Consider an example C++ class, which is used byĀ Stroustrup (1997, p.310) to demonstrate polymorphism (the original code was simplified):
Then, a sub-class of is created, overriding the method with its own implementation:
Now, it is possible to define a function, which accepts a set of instances of class and prints them one by one, calling their method .:
The information of whether elements of the set are instances of or is not available for the function in compile-time. As explained by Booch etĀ al. (2007, p.103), āpolymorphism and late binding go hand in hand; in the presence of polymorphism, the binding of a method to a name is not determined until execution.ā
Even though there are no explicitly defined types in -calculus, the comformance between objects is derived and āstronglyā checked in compile time. In the example above, it would not be possible to compile the code that adds elements to the set , if any of them lacks the attribute . Since in EO, there is no reflection on types or any other mechanisms of alternative object instantiation, it is always known where objects are constructed or copied and what is the structure of them. Having this information in compile-time it is possible to guarantee strong compliance of all objects and their users. To our knowledge, this feature is not available in any other OOP languages.
5.4. Encapsulation
Encapsulation is considered the most important principle of OOP and, according toĀ Booch etĀ al. (2007, p.51), āis most often achieved through information hiding, which is the process of hiding all the secrets of an object that do not contribute to its essential characteristics; typically, the structure of an object is hidden, as well as the implementation of its methods.ā Encapsulation in C++ and Java is achieved through access modifiers like or , while in some other languages, like JavaScript or Python, there are no mechanisms of enforcing information hiding.
However, even thoughĀ Booch etĀ al. (2007, p.51) believe that āencapsulation provides explicit barriers among different abstractions and thus leads to a clear separation of concerns,ā in reality the barriers are not so explicit: they can be easily violated. West (2004, p.141) noted that āin most ways, encapsulation is a discipline more than a real barrier; seldom is the integrity of an object protected in any absolute sense, and this is especially true of software objects, so it is up to the user of an object to respect that objectās encapsulation.ā There are even programming ābest practices,ā which encourage programmers to compromise encapsulation: getters and setters are the most notable example, as was demonstrated byĀ Holub (2004).
The inability to make the encapsulation barrier explicit is one of the main reasons why there is no information hiding in -calculus. Instead, all attributes of all objects in -calculus are visible to any other object.
In EO the primary goal of encapsulation is achieved differently. The goal is to reduce coupling between objects: the less they know about each other the thinner the the connection between them, which is one of the virtues of software design, according toĀ Yourdon and Constantine (1979).
In EO the tightness of coupling between objects should be controlled during the build, similar to how the threshold of test code coverage is usually controlled. At compile-time the compiler collects the information about the relationships between objects and calculates the coupling depth of each connection. For example, the object is referring to the object . This means that the depth of this connection between objects and is two, because the object is using two dots to access the object . Then, all collected depths from all object connections are analyzes and the build is rejected if the numbers are higher than a predefined threshold. How exactly the numbers are analyzed and what are the possible values of the threshold is a subject for future researches.
6. Complexity
One of the most critical factors affecting software maintainability is its complexity. The design of a programming language may either encourage programmers to write code with lower complexity, or do the opposite and provoke the creation of code with higher complexity. The following design patterns, also known as anti-patterns, increase complexity, especially if being used by less experienced programmers (most critical are at the top of the list):
-
ā¢
P1: Returning NULL references in case of error
(Hoare, 2009) -
ā¢
P2: Implementation inheritance (esp. multiple)
(Holub, 2003) -
ā¢
P3: Mutable objects with side-effects
(Bloch, 2016) - ā¢
-
ā¢
P5: Utility classes with only static methods
(Bugayenko, 2016) -
ā¢
P6: Runtime reflection on types
(Bugayenko, 2016) -
ā¢
P7: Setters to modify objectās data
(Holub, 2004) -
ā¢
P8: Accepting NULL as function arguments
(Hoare, 2009) -
ā¢
P9: Global variables and functions
(McConnell, 2004) - ā¢
-
ā¢
P11: Factory methods instead of constructors
(Bugayenko, 2016) -
ā¢
P12: Exception swallowing
(Rocha etĀ al., 2018) -
ā¢
P13: Getters to retrieve objectās data
(Holub, 2004) -
ā¢
P14: Code reuse via mixins (we can think of this as a special case of workaround for the lack of multiple inheritance)
(McConnell, 2004) - ā¢
-
ā¢
P16: Temporal coupling between statements
(Bugayenko, 2016) - ā¢
In Java, C++, Ruby, Python, Smalltalk, JavaScript, PHP, C#, Eiffel, Kotlin, Erlang, and other languages most of the design patterns listed above are possible and may be utilized by programmers in their code, letting them write code with higher complexity. To the contrary, they are not permitted in EO by design:
- ā¢
- ā¢
-
ā¢
, Pā¢ ā£ 6 There is no inheritance
- ā¢
- ā¢
-
ā¢
, Pā¢ ā£ 6 There is no global scope
-
ā¢
, Pā¢ ā£ 6 There are no exceptions
-
ā¢
, Pā¢ ā£ 6 There are no mixins
-
ā¢
, Pā¢ ā£ 6 Inline comments are prohibited
-
ā¢
, Pā¢ ā£ 6 There are no statements
-
ā¢
, Pā¢ ā£ 6 The syntax explicitly defines style
Thus, since in EO all patterns listed above are not permitted by the language design, EO programs will have lower complexity while being written by the same group of programmers.
7. Related Work
Attempts were made to formalize OOP and introduce object calculus, similar to lambda calculusĀ (Barendregt, 2012) used in functional programming. For example, Abadi and Cardelli (1995) suggested an imperative calculus of objects, which was extended byĀ Bono and Fisher (1998) to support classes, byĀ Gordon and Hankin (1998) to support concurrency and synchronisation, and byĀ Jeffrey (1999) to support distributed programming.
Earlier, Honda and Tokoro (1991) combined OOP and -calculus in order to introduce object calculus for asynchronous communication, which was further referenced byĀ Jones (1993) in their work on object-based design notation.
A few attempts were made to reduce existing OOP languages and formalize what is left. Featherweight Java is the most notable example proposed byĀ Igarashi etĀ al. (2001), which is omitting almost all features of the full language (including interfaces and even assignment) to obtain a small calculus. Later it was extended byĀ Jagannathan etĀ al. (2005) to support nested and multi-threaded transactions. Featherweight Java is used in formal languages such ObsidianĀ (Coblenz etĀ al., 2019) and SJFĀ (Usov and Dardha, 2020).
Another example is Larch/C++Ā (Cheon and Leavens, 1994), which is a formal algebraic interface specification language tailored to C++. It allows interfaces of C++ classes and functions to be documented in a way that is unambiguous and concise.
Several attempts to formalize OOP were made by extensions of the most popular formal notations and methods, such as Object-ZĀ (Duke etĀ al., 2000) and VDM++Ā (Durr and VanĀ Katwijk, 1992). In Object-Z, state and operation schemes are encapsulated into classes. The formal model is based upon the idea of a class historyĀ (Duke and Duke, 1990). Although, all these OO extensions do not have comprehensive refinement rules that can be used to transform specifications into implemented code in an actual OO programming language, as was noted byĀ Paige and Ostroff (1999).
Bancilhon and Khoshafian (1985) suggested an object calculus as an extension to relational calculus. Jankowska (2003) further developed these ideas and related them to a Boolean algebra. Lee etĀ al. (1996) developed an algorithm to transform an object calculus into an object algebra.
However, all these theoretical attempts to formalize OO languages were not able to fully describe their features, as was noted byĀ Nierstrasz (1991): āThe development of concurrent object-based programming languages has suffered from the lack of any generally accepted formal foundations for defining their semantics.ā In addition, when describing the attempts of formalization, Eden (2002) summarized: āNot one of the notations is defined formally, nor provided with denotational semantics, nor founded on axiomatic semantics.ā Moreover, despite these efforts, Ciaffaglione etĀ al. (2003b, a, 2007) noted in their series of works that a relatively little formal work has been carried out on object-based languages and it remains true to this day.
8. Acknowledgments
Many thanks to (in alphabetic order of last names) Fabricio Cabral, Kirill Chernyavskiy, Piotr Chmielowski, Danilo Danko, Konstantin Gukov, Andrew Graur, Ali-Sultan Ki-gizbaev, Nikolai Kudasov, Alexander Legalov, Tymur ysenko, Alexandr Naumchev, Alonso A. Ortega, John Page, Alex Panov, Alexander Pushkarev, Marcos Douglas B. Santos, Alex Semenyuk, Violetta Sim, Sergei Skliar, Stian Soiland-Reyes, Viacheslav Tradunskyi, Maxim Trunnikov, Ilya Trub, CĆ©sar Soto Valero, David West, and Vladimir Zakharov for their contribution to the development of EO and -calculus.
References
- (1)
- erl (2020) 2020. Erlang/OTP System Documentation.
- Abadi and Cardelli (1995) MartĆn Abadi and Luca Cardelli. 1995. An Imperative Object Calculus. Theory and Practice of Object Systems 1, 3 (1995).
- Alpern etĀ al. (2001) Bowen Alpern, Anthony Cocchi, Stephen Fink, and David Grove. 2001. Efficient Implementation of Java Interfaces: Invokeinterface Considered Harmless. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications.
- Armstrong (2006) DeborahĀ J. Armstrong. 2006. The Quarks of Object-OrienTed Development. Communications of the ACM 49, 2 (2006).
- Armstrong (2010) Joe Armstrong. 2010. Erlang. Communications of the ACM 53, 9 (2010).
- Bancilhon and Khoshafian (1985) Francois Bancilhon and Setrag Khoshafian. 1985. A Calculus for Complex Objects. In Proceedings of the Symposium on Principles of Database Systems.
- Barendregt (2012) HendrikĀ P. Barendregt. 2012. The Lambda Calculus: Its Syntax and Semantics. College Publications.
- Bernstein (2016) DavidĀ Scott Bernstein. 2016. Beyond Legacy Code: Nine Practices to Extend the Life (and Value) of Your Software. Pragmatic Bookshelf.
- Bettini etĀ al. (2011) Lorenzo Bettini, Viviana Bono, and Betti Venneri. 2011. Delegation by Object Composition. Science of Computer Programming 76 (2011).
- Bezanson etĀ al. (2012) Jeff Bezanson, Stefan Karpinski, ViralĀ B. Shah, and Alan Edelman. 2012. Julia: a Fast Dynamic Language for Technical Computing.
- Bi and Oliveira (2018) Xuan Bi and Bruno C. dĀ S. Oliveira. 2018. Typed First-Class Traits. In Proceedings of the European Conference on Object-Oriented Programming.
- Birka and Ernst (2004) Adrian Birka and MichaelĀ D. Ernst. 2004. A Practical Type System and Language for Reference Immutability. ACM SIGPLAN Notices 39, 10 (2004).
- Bloch (2016) Joshua Bloch. 2016. Effective Java. Pearson Education India.
- Bono and Fisher (1998) Viviana Bono and Kathleen Fisher. 1998. An Imperative, First-Order Calculus With Object Extension. In Proceedings of the European Conference on Object-Oriented Programming.
- Booch etĀ al. (2007) Grady Booch, RobertĀ A. Maksimchuk, Michael Engle, Bobbi Young, Jim Conallen, and Kelli Houston. 2007. Object-Oriented Analysis and Design With Applications.
- Bosch (1997) Jan Bosch. 1997. Object-Oriented Frameworks: Problems & Experiences.
- Bright etĀ al. (2020) Walter Bright, Alex, Andrei rescu, and Michael Parker. 2020. Origins of the D Programming Language. ACM on Programming Languages 4 (2020).
- Bugayenko (2016) Yegor Bugayenko. 2016. Elegant Objects. Amazon.
- Burton and Sekerinski (2014) Eden Burton and Emil Sekerinski. 2014. Using Dynamic Mixins to Implement Design Patterns. In Proceedings of the European Conference on Pattern Languages of Programs.
- Carter (1997) Jeffrey Carter. 1997. OOP Vs. Readability. ACM SIGADA Ada Letters XVII (1997).
- Cheon and Leavens (1994) Yoonsik Cheon and GaryĀ T. Leavens. 1994. A Quick Overview of Larch/C++.
- Ciaffaglione etĀ al. (2003a) Alberto Ciaffaglione, Luigi Liquori, and Marino Miculan. 2003a. Imperative Object-Based Calculi in Co-Inductive Type Theories. In Proceedings of the International Conference on Logic for Programming Artificial Intelligence and Reasoning.
- Ciaffaglione etĀ al. (2003b) Alberto Ciaffaglione, Luigi Liquori, and Marino Miculan. 2003b. Reasoning on an Imperative Object-Based Calculus in Higher Order Abstract Syntax. In Proceedings of the MERLINā03: Proceedings of the 2003 ACM SIGPLAN Workshop on Mechanized Reasoning About Languages With Variable Binding.
- Ciaffaglione etĀ al. (2007) Alberto Ciaffaglione, Luigi Liquori, and Marino Miculan. 2007. Reasoning About Object-Based Calculi in (Co)Inductive Type Theory and the Theory of Contexts. Journal of Automated Reasoning 39 (2007).
- Coblenz etĀ al. (2019) MichaelĀ J. Coblenz, Reed Oei, Tyler Etzel, Paulette Koronkevich, Miles Baker, Yannick Bloem, BradĀ A. Myers, Joshua Sunshine, and Jonathan Aldrich. 2019. Obsidian: Typestate and Assets for Safer Blockchain Programming. CoRR 1 (2019).
- Dahl and Nygaard (1966) Ole-Johan Dahl and Kristen Nygaard. 1966. SIMULA: an ALGOL-based Simulation Language. Communications of the ACM 9, 9 (1966).
- Danforth and Tomlinson (1988) Scott Danforth and Chris Tomlinson. 1988. Type Theories and Object-Oriented Programming. ACM Computing Surveys 20, 1 (1988), 29ā72.
- DiĀ Gianantonio etĀ al. (1998) Pietro DiĀ Gianantonio, Furio Honsell, and Luigi Liquori. 1998. A Lambda Calculus of Objects With Self-Inflicted Extension. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications.
- Dijkstra (1982) EdsgerĀ W. Dijkstra. 1982. On the Role of Scientific Thought. Springer Verlag.
- Donovan and Kernighan (2015) AlanĀ A.A. Donovan and BrianĀ W. Kernighan. 2015. The Go Programming Language. Addison-Wesley Professional.
- Duke and Duke (1990) David Duke and Roger Duke. 1990. Towards a Semantics for Object-Z. In Proceedings of the International Symposium of VDM Europe.
- Duke etĀ al. (2000) Roger Duke, Paul King, Gordon Rose, and Graeme Smith. 2000. The Object-Z Specification Language. Citeseer.
- Durr and VanĀ Katwijk (1992) Eugene Durr and Jan VanĀ Katwijk. 1992. VDM++, a Formal Specification Language for Object-Oriented Designs. In Proceedings Computer Systems and Software Engineering.
- Eden (2002) Amnon Eden. 2002. A Visual Formalism for Object-Oriented Architecture.
- Eden and Hirshfeld (2001) AmnonĀ H. Eden and Yoram Hirshfeld. 2001. Principles in Formal Specification of Object-Oriented Architectures. In Proceedings of the CASCONā01: Proceedings of the 2001 Conference of the Centre for Advanced Studies on Collaborative Research.
- Fisher and Mitchell (1995) Kathleen Fisher and JohnĀ C. Mitchell. 1995. A Delegation-Based Object Calculus With Subtyping. In Proceedings of the International Symposium on Fundamentals of Computation Theory.
- Gamma etĀ al. (1994) Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley.
- Gannimo (2017) Gannimo. 2017. Type Confusion: Discovery, Abuse, and Protection.
- Goldberg and Robson (1983) Adele Goldberg and David Robson. 1983. Smalltalk-80: the Language and Its Implementation. Addison-Wesley.
- Goodenough (1975) JohnĀ B. Goodenough. 1975. Exception Handling: Issues and a Proposed Notation. Communications of the ACM 18, 12 (1975).
- Gordon and Hankin (1998) Andy Gordon and PaulĀ D. Hankin. 1998. A Concurrent Object Calculus: Reduction and Typing.
- Gosling and McGilton (1995) James Gosling and Henry McGilton. 1995. The Java Language Environment. Sun Microsystems Computer Company 2550 (1995).
- Graham (2004) Paul Graham. 2004. Hackers & Painters: Big Ideas From the Computer Age. OāReilly Media.
- Hoare (2009) Tony Hoare. 2009. Null References: the Billion Dollar Mistake.
- Holub (2003) Allen Holub. 2003. Why Extends Is Evil.
- Holub (2004) Allen Holub. 2004. More on Getters and Setters.
- Honda and Tokoro (1991) Kohei Honda and Mario Tokoro. 1991. An Object Calculus for Asynchronous Communication. In Proceedings of the European Conference on Object-Oriented Programming.
- Hunt (1997) John Hunt. 1997. Smalltalk and Object Orientation: an Introduction. Springer Science & Business Media.
- Hunt (2000) John Hunt. 2000. Inheritance Considered Harmful. Springer.
- Ierusalimschy (2016) Roberto Ierusalimschy. 2016. Programming in Lua, Fourth Edition. Lua.Org.
- Igarashi etĀ al. (2001) Atsushi Igarashi, BenjaminĀ C. Pierce, and Philip Wadler. 2001. Featherweight Java: a Minimal Core Calculus for Java and GJ. ACM Transactions on Programming Languages and Systems 23, 3 (2001).
- Jagannathan etĀ al. (2005) Suresh Jagannathan, Jan Vitek, Adam Welc, and Antony Hosking. 2005. A Transactional Object Calculus. Science of Computer Programming 57, 2 (2005).
- Jankowska (2003) Beata Jankowska. 2003. Yet Another Object-Oriented Data Model and Its Application. Control and Cybernetics 32 (2003).
- Jech (2013) Thomas Jech. 2013. Set Theory. Springer Science & Business Media.
- Jeffrey (1999) Alan Jeffrey. 1999. A Distributed Object Calculus. In Proceedings of FOOL.
- Jemerov and Isakova (2017) Dmitry Jemerov and Svetlana Isakova. 2017. Kotlin in Action. Manning Publications Company.
- Jones (1993) CliffĀ B. Jones. 1993. A Pi-Calculus Semantics for an Object-Based Design Notation. In Proceedings of the International Conference on Concurrency Theory.
- Kay (1986) Alan Kay. 1986. FLEXāA Flexible Extendable Language.
- Kay (1997) Alan Kay. 1997. The Computer Revolution Hasnāt Happened yet.
- Khanam (2018) Zeba Khanam. 2018. Barriers to Refactoring: Issues and Solutions. International Journal on Future Revolution in Computer Science & Communication Engineering 4 (2018).
- Landin (1966) PeterĀ J. Landin. 1966. The Next 700 Programming Languages. Communications of the ACM 9, 3 (1966).
- Lee etĀ al. (1996) Kwak Lee, Hoon-Sung Ryu, Hong-Ro, and Keun-Ho. 1996. A Translation of an Object Calculus into an Object Algebra. The Transactions of the Korea Information Processing Society 3 (1996).
- Lutz (2013) Mark Lutz. 2013. Learning Python: Powerful Object-Oriented Programming. OāReilly Media.
- Madsen and MĆøller-Pedersen (1988) OleĀ Lehrmann Madsen and Birger MĆøller-Pedersen. 1988. What Object-Oriented Programming May Be-And What It Does Not Have to Be. In Proceedings of the European Conference on Object-Oriented Programming.
- Martin (2008) RobertĀ C. Martin. 2008. Clean Code: a Handbook of Agile Software Craftsmanship. Prentice Hall PTR.
- Martin etĀ al. (1997) RobertĀ C. Martin, Dirk Riehle, and Frank Buschmann. 1997. Pattern Languages of Program Design 3. Addison-Wesley.
- Matsakis and Klock (2014) NicholasĀ D. Matsakis and FelixĀ S. Klock. 2014. The Rust Language. ACM SIGADA Ada Letters 34, 3 (2014).
- McConnell (2004) Steve McConnell. 2004. Code Complete, Second Edition. Microsoft Press.
- Meyer (1997) Bertr Meyer. 1997. Object-Oriented Software Construction. Prentice Hall.
- Mikhajlov and Sekerinski (1998) Leonid Mikhajlov and Emil Sekerinski. 1998. A Study of the Fragile Base Class Problem. In Proceedings of the European Conference on Object-Oriented Programming.
- Mitchell etĀ al. (1993) JohnĀ C. Mitchell, Furio Honsell, and Kathleen Fisher. 1993. A Lambda Calculus of Objects and Method Specialization. In Proceedings of the IEEE Symposium on Logic in Computer Science.
- Nierstrasz (1989) Oscar Nierstrasz. 1989. A Survey of Object-Oriented Concepts.
- Nierstrasz (1991) Oscar Nierstrasz. 1991. Towards an Object Calculus. In Proceedings of the European Conference on Object-Oriented Programming.
- Nierstrasz (2010) OscarĀ Marius Nierstrasz. 2010. Ten Things I Hate About Object-Oriented Programming. Journal of Object Technology 9, 5 (2010).
- Nystrom (2014) R. Nystrom. 2014. Game Programming Patterns. Genever Benning.
- Paige and Ostroff (1999) RichardĀ F. Paige and JonathanĀ S. Ostroff. 1999. An Object-Oriented Refinement Calculus.
- Rentsch (1982) Tim Rentsch. 1982. Object Oriented Programming. ACM SIGPLAN Notices 17, 9 (1982).
- Richards etĀ al. (2010) Gregor Richards, Sylvain Lebresne, Brian Burg, and Jan Vitek. 2010. An Analysis of the Dynamic Behavior of JavaScript Programs. In Proceedings of the Conference on Programming Language Design and Implementation.
- Rocha etĀ al. (2018) Jonathan Rocha, Hugo Melo, Roberta Coelho, and Bruno Sena. 2018. Towards a Catalogue of Java Exception Handling Bad Smells and Refactorings. In Proceedings of the 25th Conference on Pattern Languages of Programs.
- Schmager etĀ al. (2010) Frank Schmager, Nicholas Cameron, and James Noble. 2010. GoHotDraw: Evaluating the Go Programming Language With Design Patterns. In Proceedings of the PLATEAUā10: Evaluation and Usability of Programming Languages and Tools.
- Seiter etĀ al. (1998) LindaĀ M. Seiter, Jens Palsberg, and KarlĀ J. Lieberherr. 1998. Evolution of Object Behavior Using Context Relations. IEEE Transactions on Software Engineering 24, 1 (1998).
- Shelly (2015) Asaf Shelly. 2015. Flaws of Object Oriented Modeling. (2015).
- Stefik and Bobrow (1985) Mark Stefik and DanielĀ G. Bobrow. 1985. Object-Oriented Programming: Themes and Variations. AI Magazine 6, 4 (1985).
- Stroustrup (1997) Bjarne Stroustrup. 1997. The C++ Programming Language. Addison-Wesley Professional.
- Ungar etĀ al. (1987) David Ungar, R. Smith, and all B. 1987. Self: the Power of Simplicity. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications.
- Usov and Dardha (2020) Artem Usov and Prnela Dardha. 2020. SJF: an Implementation of Semantic Featherweight Java. In Proceedings of the Coordination Models and Languages. COORDINATION 2020, Vol.Ā 12134.
- West (2004) David West. 2004. Object Thinking. Pearson Education.
- Yourdon and Constantine (1979) Edward Yourdon and LarryĀ L. Constantine. 1979. Structured Design: Fundamentals of a Discipline of Computer Program and Systems Design. Prentice-Hall.