# What is the origin of dot notation?

In object-oriented programming, dot notation is used when accessing the properties or methods of a class:

Dog dog
print dog.name
>> "Fido"
dog.walk()
>> Walking the dog now...


What is the origin of that syntax and why the . to notate it? It must date to some early object-oriented language, but I couldn't find mention of it anywhere.

• Maybe Simula? – D.W. Mar 7 '18 at 22:56

In [1] (authored by one of the co-creators of Simula), there is a suggestion that Simula 67 may have been the first to use this dot notation. Given that Simula is widely credited for being the first OO language, it may be tricky to find an earlier example specifically in an OO context.

EDIT: On DiscreteLizard's suggestion in comments, I took a peek at the use of this dot notation for specifying fields in a record. As it turns out, according to this specification of the PL/I language for the IBM System/360 from July 1965, the dot notation was indeed used to identify fields within structures:

A qualified name takes the form:

identifier {. identifier} ...

Examples: 1. A program may contain the structures:

DECLARE 1 CARDIN, 2 PARTNO, 3 DESCRIPTION, 2 PRICE;

DECLARE 1 CARDOUT, 2 PARTNO, 2 DESCRIPTION, 2 PRICE;

Elements are then referred to as:

CARDIN.PARTNO

CARDOUT.PARTNO

CARDIN.PRICE

1. Dahl, Ole-Johan. "The Birth of Object Orientation: the Simula Languages." From Object-Orientation to Formal Methods. Springer, Berlin, Heidelberg, 2004. 15-25.
• Very interesting! Sadly, it doesn't mention why the . was chosen – maybe that's overly esoteric and it simply was an available character not used in mathematical operations? – JeffThompson Mar 8 '18 at 11:50
• @JeffThompson . is also often used outside OO context to denote fields of a certain data structure. It is possible that this usage predates the OO usage. – Discrete lizard Mar 8 '18 at 12:24
• @DiscreteLizard Perhaps. However, the Dahl paper cites two articles by C.A.R. Hoare in ALGOL Bulletin from 1965 & 1966 ("Record Handling" & "Further Thoughts on Record Handling") that, to my reading, treats the idea of records with field names as novel. Interestingly, Hoare does not use the "obj.field" dot notation in those articles but rather a more functional "field(obj)" notation. – mhum Mar 8 '18 at 18:39
• Nice detective work @Discretelizard and @mhum! Any chance you can trace it further? Maybe it's outside this forum's scope, but it would be interesting to know where this syntax originated for data structures? Or is this 1965 article the first place it was mentioned? – JeffThompson Mar 9 '18 at 0:33
• @JeffThompson There may very well be earlier references. However, one issue with going further back is that the languages you encounter earlier might not even have these kinds of data structures (e.g.: I think FORTRAN IV only had numbers, strings, and arrays). – mhum Mar 13 '18 at 22:55