POV-Ray : Newsgroups : povray.off-topic : I'm in the mood for monads : Re: Living in a box Server Time
29 Jul 2024 16:22:48 EDT (-0400)
  Re: Living in a box  
From: clipka
Date: 23 Apr 2012 10:06:44
Message: <4f9561f4$1@news.povray.org>
Am 23.04.2012 15:43, schrieb Invisible:

> I love how 5.5 added "OOP", which consisted of letting you use the
> keyword "class" instead of "record", and letting you write your function
> code inside a class instead of outside it. I spent ages trying to figure
> out what advantage that gives you. And of course... IT DOESN'T. It's no
> different. In particular, IT'S NOT OOP.
>
> It would have /actually/ been OO if it had let you make fields private,
> or if it supported dynamic binding. But noooo... :-P

There is no language that "is OOP". OOP is a software design approach; 
An OO language (or OO language feature) is one that helps you implement 
such a design, but nothing more.

Bundling record data and related functions (aka methods) in a single 
thing called "class" does help you write software that makes use of data 
encapsulation (an OOP concept); it doesn't help you with enforcing the 
rules of encapsulation, but it simplifies the syntax by (1) 
automatically passing the ubiquitous "this" pointer, and (2) adding new 
namespaces to avoid naming collisions. As such, it does qualify as an OO 
language feature.

BTW, I'm not sure whether they added any new syntax features to classes 
from 5.5 to 6.0, but AFAIR 6.0 *did* support polymorphism; I think the 
"Turbo Vision" framework made excessive use of it.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.