d future or plans for d3

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 20 11:03:01 PST 2011


On 12/20/11 11:41 AM, Jonathan M Davis wrote:
> 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 think the model you're discussing is often called "object-based".

Andrei



More information about the Digitalmars-d mailing list