5 ms·
Reminds me of the (possibly) apocryphal story of Nickolas Wirth telling his audience at Apple that Modula-2 was OO and having one of the audience members object
by ChuckMcM 12y ago
Reminds me of the (possibly) apocryphal story of Nickolas Wirth telling his audience at Apple that Modula-2 was OO and having one of the audience members object. To which Dr. Wirth replied, "Who are we to say what object oriented means exactly?" and the objector, who turns out to be Alan Kay, says, "Well I invented the term so I get to define it, this isn't object oriented."
I would say that similar objections would be made about Go calling it self 'object oriented' however I also don't know what is being asserted.
Go has many constructs that make abstraction easier, and that is what many programmers want out of the OO idea, so its fine. I'm sure there specific things that some people require before they will label something as OO. Is it a functional question or a religious question as to whether or not Go is Object Oriented?
- arethuza 12y agoI've long since given up thinking about a precise definition of "object oriented" - for example, CLOS (which I used for years and thought was awesome) doesn't sit very well with most peoples ideas around what constitutes "object oriented" which seem to be largely define by experience with C++, Java or C# (which all look the same if you squint hard enough). e.g. This discussion: http://c2.com/cgi/wiki?HowObjectOrientedIsClos http://c2.com/cgi/wiki?HowObjectOrientedIsClos [NB I now just tend to think whether something is useful, leaving ideological purity to others.]
- seanmcdirmid 12y agoDo you program with entities that have names and you can talk about their interactions as if they had behavior of their own? If so, then you have objects. Do you program with anonymous values without names independent of their structure, and you can then reason about them equationally? If so, then you have values and probably lambdas to plumb them through the program as they lack their own behavior (you can have lambdas over objects also, but we don't call that functional these days). Does the language encourage you to think about named entities or does it encourage you to reasoning about values? Of course, not many languages beyond Haskell try to push you to reason about everything as values. And most OOP languages include some form of values these days (if not, we definitely program with immutable objects like points that lack names/identity and might as well be called values). This is also why OOP is necessarily tied up with state: it doesn't make sense for an immutable container of something to even have a name as it can be only really be identified by its structure.
- arethuza 12y agoWell, it's been a while since I wrote CLOS for living - but I don't think I found it useful to regard behaviour as being tied to a single class - that sort of implies limited single dispatch whereas CLOS has the wonders of full multiple-dispatch so your behaviors are really attached to tuples of classes and other types. An awful lot can happen between you calling a generic function and your method(s) being called - and pretty much all of it is customizable - hence the "CLOS is best thought of as being implemented in CLOS", which I think is from the AMOP.
- jasode 12y ago>I'm sure there specific things that some people require before they will label something as OO. For many folks, it's basically built-in language syntax for objects (data+methods) instead of using patterns, idioms, and conventions. The object-oriented nature is explicit with syntax of language keywords instead of implicit with code organization. >Is it a functional question or a religious question as to whether or not Go is Object Oriented I think it's more of a functional/pragmatic one and not religious. (I would substitute the word "religious" for "psychological" -- more on that in the next paragraph). If a language is designated as "object-oriented", I think it's reasonable to have some expectations that the programmer does not have to write idioms & patterns to emulate C++/C# type of objects. That said, there are still psychological motivations for expanding "object-oriented" to describe what Go can do. The problem is that the term "object-oriented" has gained a lot of currency as something useful and desirable in the programming world. Therefore, if someone labels something (e.g. Go) as "not object-oriented", that has an implied judgement that Go is somehow "handicapped" and has less power than C++/C#/etc. Ideally, all programmers would treat the following statements as something neutral and non-threatening: "Go is not object-oriented. C language not-object-oriented." But since we can't (the psychology), we get articles explaining how C and Go are actually object-oriented after all. We do this, that, and the other thing, and voila, "C is object oriented."
- jeremyjh 12y ago>Therefore, if someone labels something (e.g. Go) as "not object-oriented", that has an implied judgement that Go is somehow "handicapped" and has less power than C++/C#/etc. But that is precisely the point of Go: it IS less powerful. It has no inheritance, no generics or templates, no macros or pre-processor, no raw pointer access, no exceptions etc. This is all completely intentional, and yes it will be a turn-off to many.
- jasode 12y agoUnderstood. But then people can just shift the argument around to the word "powerful". Unlike electricity where "power" is composed of just 2 dimensions (voltage and current), "power" in a language has hundreds of dimensions. If for one programmer, the "interesting" things in Go include ultra fast compile times, builtin concurrency primitives, network library, etc, then to him, "Go is more powerful than C++." The disagreement over what dimensional components of "powerful" is worth comparing then feeds more debates (and implied judgments of language worthiness).
- tptacek 12y agoRob Pike does claim that Golang is object-oriented. But I think I agree with the subtext that this is a very unproductive debate to have.
- twic 12y agoIt seems it was someone who had worked with Wirth, rather than Wirth himself, who was the victim, and he was talking about Oberon rather than Modula-2, but there seems to be an eye witness report of it: http://c2.com/cgi/wiki?HeInventedTheTerm http://c2.com/cgi/wiki?HeInventedTheTerm