'object' 'instance' language mix in documentation is confusing

A bit of a wrap up here.

I’ve spent a bit more time with Julia and plan to use it for a project. I’ve used CLOS quite a bit, and I like its approach. I also found with CLOS that the composition pattern worked out better than inheritance, so I don’t miss inheritance. (Otherwise in CLOS there were problems writing methods to access only the parent type for doing parent type specific stuff. Composition avoids that. … Some of that discussion can probably be found in the common lisp forums.) This is all good. I like the basic approach adopted here with Julia.

Here I’m not talking about the basic approach just rather suggesting with the doc that what is being instantiated are instances, not objects. Sometimes the doc says this, sometimes it doesn’t - the mix is a bit confusing. You can find others also confused by this, for example, Inheritance in Julia, where kristoffer.carlsson observes “Julia is not really a OO language.”

Julia has instantiated types. Those instances are matched by their types against function calls at time of dispatch. Inheritance applies to interfaces, not to data, so the implementation is free to change the data format as long as the interface stays in tact. Hence, the data is nothing more than an instance of concrete type - which is a good thing.

So I was wondering what it would look like if the doc page on types was written explaining that one instantiated type to get instances, rather than one was building objects. I wrote something up and put it on github, https://github.com/JuliaLang/julia/pull/28484

There were places where it made a lot of sense, and some rough spots that needed improving. The pull request on that page, which surely needed revision, was closed while mentioning that the language of objects was common in Java and other languages - which is a bit quizzical given the approach in Julia is so different than the mentioned languages.

Anyway, there are the hooks in case anyone else wants to take a look, or have a hand it a revision.

Seems to me that … a person can find objects in Julia programs, but not in one place.
There is not a closed syntactical unit for declaring them, nor functions for manipulating them as such. One can manipulate type, one works with instances, but one never encapsulates the two as a unit. … so it would be correct to say one sends a print message to a point object, but that object is an abstraction not to be confused with the data instance.