News for hackers. Stuff that matters.
Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @04:37AM (#11967877)
I find it interesting that everyone gets so up-beat about the ideology or philosophical debate about objects sending each object messages, hell even not relying to a message one object send you until a later date. Without even thinking about concurrency, state, and hell even the basics such as cyclic loops within a event based system!

Though I keep hearing from Alan and other prominent language designers that we still are holding onto this old 1960 mental model of command and control, or structured design concepts. Even some well spoken people suggest that the whole notion of object's are worthless to programmers because it takes place within the notion of classes and constraints of the machine.

This whole philosophical debate about understanding/miss-understanding/correct usage of OOP is just a complete waste of time.

For what its worth I consider object's simply as a basic level category of procedures and data tied to a namespace. If the category requires state then consider it as a object otherwise its considered a module.

I've seen too many project's that have drunken the cool aid and has resulted in 5-10 level deep inheritance tree's with their own branching logic trying to fit behavior to a specific taxonomy.

Re:Alan Kay on the misunderstanding of OOP (1998) by optforfon on Friday June 24, 2016 @05:20AM (#11968119)
"For what its worth I consider object's simply as a basic level category of procedures and data tied to a namespace.“

I mean you're just using different words to talk about the same thing. In your terminology inheritance is just extending a namespace and overloading names.

How does that discredit or put into question the "mental model of command and control, or structured design concepts"

If anything I feel the failure of OO languages is that they have been afraid of baking in proven design patterns/principles that reoccur over and over (ie. Gang of Four and a few more since then). Yesterday i was staring at some undocumented OpenCV code trying to figure out why there was some pointer that kept showing up in random places. After a very confusing 30 minutes i figured out it was actually the pImpl idiom. Now why do we have to have to reimplement the pImpl idiom each time? why can't this be a keyword?. The amount of code bloat and confusion that a visitor introduces is the prime reason I never use them. (There was an interesting proposal at CppCon 2 years ago that addressed this, but as far as I know it's not gone anywhere)

The problem is that the most OO language trace back to C which IS a half-assed language from the perspective of "concurrency, state, and hell even the basics such as cyclic loops within a event based system" and most languages that do OO have been half baked on top of that foundation.

Re:Alan Kay on the misunderstanding of OOP (1998) by kmiroslav on Friday June 24, 2016 @08:13AM (#11969124)
> If anything I feel the failure of OO languages

What failure exactly?

OOP has flaws but it has certainly proven to be extremely versatile and adaptable over these past decades since even today, it's still the dominant paradigm to solve modern problems in computing.

Re:Alan Kay on the misunderstanding of OOP (1998) by infinite8s on Friday June 24, 2016 @10:57AM (#11970239)
Seriously? Have you watched any of the demos Alan references? They were doing things with computers in the 1960s/70s that still haven't reached mainstream use as yet. Computers as used today are still absolutely dumb machines that are little more than super-fast calculators, and in most cases increases the mental burden of their users instead of reducing/augmenting them. Nicholas Negroponte had a great quote in '94 that's still true today - "those infra-red urinals in public restrooms know more about what we are doing than our computers today."
Re:Alan Kay on the misunderstanding of OOP (1998) by ludamad on Friday June 24, 2016 @02:06PM (#11972031)
Can you summarize what those things might be? (That haven't reached mainstream use)
Re:Alan Kay on the misunderstanding of OOP (1998) by infinite8s on Friday June 24, 2016 @02:26PM (#11972193)
Here are 2 that he often brings up:

Ivan Sutherland's Sketchpad demo - Object oriented graphics using a constraint based system (https://www.youtube.com/watch?v=6orsmFndx_o)

Douglas Englebart's demo - too many innovations to list, but includes real time collaboration (he demoed in a convention center while the system ran 30 miles away in his lab, connected by a leased line operating at 1200 baud!). People think he just invented the mouse, but the overarching theme in his work was augmenting human capabilities... http://dougengelbart.org/firsts/dougs-1968-demo.html

Re:Alan Kay on the misunderstanding of OOP (1998) by tamana on Saturday June 25, 2016 @05:13PM (#11978021)
Which of those things are not in mainstream use? We have Skype and Google Docs and AWS for collaboration and client/server computing.
Re:Alan Kay on the misunderstanding of OOP (1998) by ethbro on Wednesday June 29, 2016 @11:42AM (#12002387)
I hadn't seen the Sketchpad, thanks for the link.

One of the things that consistently impresses me about 1960s computing demos is the clarity of meaning and lack of jargon.

Re:Alan Kay on the misunderstanding of OOP (1998) by wdewind on Friday June 24, 2016 @02:02PM (#11972001)
Do you have links to any of those demos?
Re:Alan Kay on the misunderstanding of OOP (1998) by tripzilch on Saturday June 25, 2016 @12:14PM (#11976808)
See infinite8s' post above. The "Engelbart's demo" mentioned is called The Mother of All Demos, which you can find by that title on youtube.

I have to admit I never really got further than the first 5-10 minutes or so. My first computer experiences are from the late 80s (and indeed didn't have a mouse) but this demo is so old, I kept having to mentally translate for myself which bits might have been new or ground breaking, and which just plain archaic. I keep meaning to watch it in full some day, but the first bit that I saw, I keep feeling I'm missing something important. People are lyrical about this demo (hence the name!), but I don't quite feel it or something. Then again, while I appreciate the great work of engineering that went into it, I'm not really one to sit down and watch a documentary about the moon landing program either.

Maybe somebody here knows a good link or article about The Mother of All Demos that explains which things I should be in awe about and why they were so novel then?

Part of it kind of looks like a simple database table system, which reminds me of a stupid story from my childhood. When I was young (~1990 I guess), I was playing with the MSX BASIC on a friend's computer whose family had a farm. They wondered if I could write anything to keep track of their cows or something--sure thing! (though I really preferred to write graphics code, later joined the demoscene, way more fun). Now I had no idea about business or their requirements (let alone requirements engineering), so I just wrote some whatever that let them enter data, but in the back of my mind I wondered how this was going to be useful for anything. Neither did I know (yet) how to actually save the data so it'd be available after reboot, which was probably a big reason for my doubts. And they were still impressed (that it could repeat names of many cows, I guess). I never finished it (nor any idea of what "finished" would mean).

Re:Alan Kay on the misunderstanding of OOP (1998) by optforfon on Friday June 24, 2016 @10:06AM (#11969823)
Sorry, I mean "drawbacks". One of the reoccurring complaints about OO is that it leads to huge codebases. Lots of articles about how X rewrote some Java program in Y and it's not 10x smaller and 100x more maintainable. This is a consequence of languages being designed to be minimal in terms of keywords - trying to push off as much as possible on to library writers. Unfortunately this seems to have serious limitations and all the boilerplate can't seem to be hidden in library wrappers
Re:Alan Kay on the misunderstanding of OOP (1998) by kmiroslav on Friday June 24, 2016 @12:18PM (#11970993)
"Huge code base" is a pretty vague metric. Huge in what, lines of code? Binary size?

I'd argue that neither of these are really a good measure, I'm more interested in the concepts that a source file captures than its size in kb, because these concepts correlate directly to how easy it will be to evolve that code base in the future. There is a point of diminishing return in trying to make the code too compact, which basically means you're optimizing in one dimension at the detriments of all the others.

Re:Alan Kay on the misunderstanding of OOP (1998) by dursk on Friday June 24, 2016 @03:35PM (#11972758)
The problem there is that any re-write, even staying within OO, is going to result in the codebase being smaller.
Re:Alan Kay on the misunderstanding of OOP (1998) by Retra on Saturday June 25, 2016 @02:00PM (#11977255)
All that versatility and adaptability comes at the expense of various kinds of boilerplate, most of which can be avoided by employing other styles. In other words, it's not more versatile, it's only "Turing complete", and versatility would mean using a number of different styles and being efficient in each.
Re:Alan Kay on the misunderstanding of OOP (1998) by pjmlp on Friday June 24, 2016 @07:06AM (#11968758)
I can think of a good list of OO languages that don't have anything to do with C.

Also the pImpl is a consequence of C++ not adopting modules and instead rely on C linkers, nothing to do with OOP.

Re:Alan Kay on the misunderstanding of OOP (1998) by kabdib on Friday June 24, 2016 @12:09PM (#11970914)
Yup. We were looking at alternate runtimes in some OS / userland projects at Apple in the late 80s. You don't need vtables, and you can do better than static struct layout. You have to do some work at code load-time.

C++'s initial lack of a real string type and simple collection types pretty much doomed the language. (Instead they did iostreams? I've been using C++ since early CFront days, and have never used that misbegotten API).

Re:Alan Kay on the misunderstanding of OOP (1998) by pjmlp on Friday June 24, 2016 @02:27PM (#11972200)
I guess I am one of the few people on the planet than enjoys using iostreams when I need to use C++. :)

Then again, I never needed to know all their little details.

Yeah implementing string, array and collection types was a kind of rite of passage for every C++ developer, back when the compilers were still trying to catch up with C++ARM.

I believe appealing to the C culture was one of the reasons those types weren't initially available, as C++ was already considered too bloated by the C community even without them.

Nowadays their three major compilers are written in C++.

Re:Alan Kay on the misunderstanding of OOP (1998) by llamaz on Friday June 24, 2016 @06:00AM (#11968338)
> I've seen too many project's that have drunken the cool aid and has resulted in 5-10 level deep inheritance tree's with their own branching logic trying to fit behavior to a specific taxonomy.

I don't think you understand Alan Kay's version of OOP, if you think inheritance is a key part of OOP.

I was interested in this stuff during the summer and I wrote up the following question/answer if you're interested on what Alan Kay's version of OOP was:

https://cs.stackexchange.com/questions/51847/what-is-the-dif...

I answered my own question so I might be wrong, but I have put in a reasonable amount of research effort into it.

Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @07:48AM (#11968982)
I read your essay on programming languages. I found it was awesome btw.

I saw you made the comment `o be concrete - object oriented programming is easy in python, because it's possible to program methods of an object in a way that doesn't assume a particular representation.`

I thought you would be really interested in usage of polymorphism in python (http://neverworkintheory.org/2016/06/13/polymorphism-in-pyth...).

Quote from the article: `Our findings show that the receiver in 97.4% of all call-sites in the average program can be described by a single static type`.

It looks like even when that restriction is removed it doesn't really help that much.

Another great podcast on evidence based programming: https://www.functionalgeekery.com/episode-55-andreas-stefik/

Evidence-based programming language design : a philosophical and methodological exploration: https://jyx.jyu.fi/dspace/handle/123456789/47698

Is another great read if you've got the time.

Re:Alan Kay on the misunderstanding of OOP (1998) by llamaz on Friday June 24, 2016 @05:22PM (#11973576)
Thanks for the links :) I've saved them and hope to eventually make my way through them
Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @06:49AM (#11968650)
Not saying its a key part. Im in the camp you better have a damn good reason to use inheritance that composition will suffice.

The whole notion that everyone has their own perspective on oop makes it a mute point.

Re:Alan Kay on the misunderstanding of OOP (1998) by pkroll on Friday June 24, 2016 @06:54AM (#11968681)
Actually that's "moot point": http://www.dictionary.com/browse/moot-point

But yes, the number of variant perspectives on OOP make it a less descriptive term than would be ideal.

Re:Alan Kay on the misunderstanding of OOP (1998) by mercer on Friday June 24, 2016 @09:42AM (#11969689)
Or a cow's opinion!

No but seriously, I think both you and hackits make it clear that there's a lot of discussion over what OOP actually is. Which makes me curious: is there any research on the characteristics of OOP as it implemented in practice across languages? I'd be very interested in such research, because it seems to me that what is possible is often not practiced.

So, for example, Ruby might be all about 'message passing' as others, and all the tutorials and books I've read indicate, but in practice it might be indistinguishable from just calling methods on objects, or whatever distinguishes message passing from other OOP styles.

If no such research exists, how difficult would it be to scan codebases on Github to analyse this? I might be wrong, but it seems like this would be a worthwhile investigation: how do people actually use languages and what is 'OOP' or 'FP' actually like in codebases that claim to be one or the other.

Otherwise we're just getting tangled up in definitions and it's all a moo point.

Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @10:54AM (#11970217)
As of a research paper by Kaijanaho, Antti-Juhani (https://jyx.jyu.fi/dspace/handle/123456789/47698)

Since 1960 till 2012, there are only 22 research papers that used empirical evidence with randomised cross over studies for language design.

As of which, Class inheritance had 4 randomized controlled experiments. With a collection of other studies. That is mostly of the information I have come across.

There is a research paper on Java that looked at how programmers use inheritance. It's a interesting read and its a good source. (https://researchspace.auckland.ac.nz/handle/2292/16840)

I think Google published another paper looking at development time and I believe the result was the biggest time consumer for programmer was dependencies not necessary the programming langue.

Re:Alan Kay on the misunderstanding of OOP (1998) by infinite8s on Friday June 24, 2016 @02:14PM (#11972100)
I'm not sure measuring how programmers use programming languages would help you gauge whether those languages are any good. It's like measuring the way people rode bicycles in 1880 - that would never lead you to invent the car.
Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @11:01AM (#11970278)
> Otherwise we're just getting tangled up in definitions and it's all a moo point.

I agree. I would say a lot of things people do in OOP isn't really OOP it's just object modeling principles. You can apply the same principles in a different language without notions of objects/classes (javascript) comes to mind.

Re:Alan Kay on the misunderstanding of OOP (1998) by aryehof on Friday June 24, 2016 @05:44AM (#11968246)
Part of the issue is that people have differing perspectives on computing.

One half, see it in terms of computer and data science. For these, data-structures, algorithms and ADTs are paramount. Organization of the problem is through modularity and functional decomposition. An object (as in OO) might be useful for encapsulation, data and implementation hiding, and code organization.

On the other hand, there are people involved in business, commerce, industry etc, who need to model concepts, real and abstract, and the complex relationships and constraints between them, into code. For them, an object can be the best way to represent a concept and an OO approach can be the best way to represent how concepts interact with each other.

Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @06:50AM (#11968658)
Agree completly. Kind of the reason why they call it a general pr9gramming language.
Re:Alan Kay on the misunderstanding of OOP (1998) by DanielBMarkham on Friday June 24, 2016 @05:49AM (#11968267)
My gut feeling is that OOA/D/P will best be remembered as a revolution in analysis, not programming. As a programming concept it's a mixed bag. As an analysis tool I don't think it has an equal.
Re:Alan Kay on the misunderstanding of OOP (1998) by mpweiher on Friday June 24, 2016 @06:02AM (#11968352)
Well, try to remember that for Alan, inheritance is at most an optional feature of OOP, so maybe those "5-10 level deep inheritance trees" aren't as much about people drinking the OOP "cool-aid" as you think.
Re:Alan Kay on the misunderstanding of OOP (1998) by hackits on Friday June 24, 2016 @06:46AM (#11968634)
Both simual and smalltalk inheritance was added later in the languages history. Yes its optional but it doesnt stop people making a mess of things when they categorise their objects based on data type instead of behaviour
Re:Alan Kay on the misunderstanding of OOP (1998) by gnaritas on Friday June 24, 2016 @02:13PM (#11972088)
Nothing can stop bad programmers from writing bad code. Take OOP away from them, and they'll just write bad procedural code or bad functional code; their bad code is not a stain on the paradigm they choose to abuse.
Re:Alan Kay on the misunderstanding of OOP (1998) by Retra on Saturday June 25, 2016 @01:56PM (#11977232)
Apostrophes do not denote plurality.