[TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

Mark Janssen dreamingforward at gmail.com
Sat Apr 20 02:24:46 EDT 2013


>> Object-oriented, as constituted today, is just a layer of abstraction over
>> imperative programming (or imperative style programming in functional
>> languages, because objects require side-effects).
>
> The idea that objects require side-effects is a common misconception. You
> can find a number of object-oriented abstractions that do not involve
> mutable state in commonly-used libraries.  If most object-oriented code is
> stateful, it's probably more or less because most code, in general, is
> stateful.

I think the reference of objects having side-effects refers to those
used within functional languages.  But here I would suggest the
nomenclature ("object") is vague.  If the wikiwikiweb "language wars"
is an indication, this vagueness is part of the problem as I noted in
an earlier message.

> You can write objects in just about any language (GTK+ and Microsoft's COM
> are good examples of objects in C) but it's quite awkward to do so.  A good
> working definition of an "object-oriented language" is a language that makes
> it _easy_ to define values exporting a procedural interface to data or
> behavior.  Likewise, you can do functional programming in C if you want, but
> it's a lot easier if you have language support in the form of lambda
> expressions, closures, etc.

I think a key "articulation point" to the confusions are the common
use of the word "language" to refer to something in a computer vs. a
tool for interaction.  It's like two worlds collided.

>> What "object-oriented" language actually in use now isn't just
>> an imperative language with fancy abstraction mechanisms?

Haha, but the keyword in that sentence is "fancy".  With a fancy
enough abstraction layer I can make *anything* look like anything else
to the point where definitions are rendered meaningless.  But the
point of *having a field* (like C.S.) and having publications is to
make words more definitive, not less.

Thanks for the dialog, and I apologize to the types-list  immensely
for my continued responses despite my complete lack of credentials.
-- 
MarkJ
Tacoma, Washington


More information about the Types-list mailing list