d future or plans for d3

Jonathan M Davis jmdavisProg at gmx.com
Tue Dec 20 09:41:49 PST 2011


On Tuesday, December 20, 2011 17:58:30 Timon Gehr wrote:
> On 12/20/2011 05:36 PM, Jonathan M Davis wrote:
> > On Tuesday, December 20, 2011 15:49:34 Timon Gehr wrote:
> >> 2. Dynamic binding is a core concept of OOP. A language that does not
> >> support dynamic binding does not support OOP. A program that does not
> >> use dynamic binding is not object oriented. What is to disagree with?
> > 
> > I don't agree with that either. You don't need polymorphism for OOP.
> > It's
> > quite restricted without it, but you can still program with objects even
> > if you're restricted to something like D's structs, so you're still
> > doing OOP.
> > 
> > - Jonathan M Davis
> 
> No. That is glorified procedural style. 'Objects' as in 'OOP' carry data
> and _behavior_, structs don't (except if you give them some function
> pointers, but that is just implementing poor man's polymorphism.)
> 
> Having some kind of dynamic execution model is a requirement for OOP.
> There are no two ways about it.

Well, I completely disagree. The core of OOP is encapsulating the data within 
an object and having functions associated with the object itself which operate 
on that data. It's about encapsulation and tying the functions to the type. 
Polymorphism is a nice bonus, but it's not required.

I'd say that any language which is really trying to do OOP should definitely 
have polymorphism or it's going to have pretty sucky OOP, but it can still 
have OOP.

- Jonathan M Davis


More information about the Digitalmars-d mailing list