POV-Ray : Newsgroups : povray.off-topic : I'm in the mood for monads : Re: Living in a box Server Time
29 Jul 2024 16:27:09 EDT (-0400)
  Re: Living in a box  
From: Invisible
Date: 23 Apr 2012 11:06:41
Message: <4f957001$1@news.povray.org>
>> "Hey! Look! Our product is OO now! BUY IT!!"
>
>    Criticism of the overhyping of object-oriented programming is nothing new.

It just irks me when people take a concept, produce a superficial 
semblance of it, and then claim that as the genuine article. Borland 
took the idea of OOP and added some trivial syntactic changes which give 
the illusion of extra power, without actually offering any.

> A famous paper named "My cat is object-oriented" was published in 1989.
> (The title is a jab at the fact that anything that claims to be "object-
> oriented" sells better, thus if you are selling your cat...)

Required XKCD quote: http://www.xkcd.com/26/

>> About the only /useful/ thing it actually added was a per-type namespace
>> for methods. What's it, really. You could /already/ group code and data
>> together using modules, so the mere syntactic ability to write one
>> inside the other isn't much of a big deal.
>
>    No, what object-oriented programming added was inheritance and
> polymorphism. Modules (complete with member functions, public and
> private sections, module instantiation and references) existed before
> object-oriented programming. What OOP added was inheritance, dynamic
> binding and the ability to handle objects polymorphically.
>
>    There are some applications where OOP fits like a glove (eg. GUI
> programming), but in most situations just the modular part of OOP is
> more than enough.

You can write modules in Pascal. The functions within them can be public 
or private. The types can also be public or private.

However, if a type is public, its entire internal structure must also be 
public. (That includes any types it mentions.) Similarly, any type which 
is an argument or result type to a public function must be public.

If they had removed these artificial limitations, that would have been 
/far/ more useful than just changing the "record" keyword to "class". :-P

(Indeed, that's what Haskell does: You can make a type public, but keep 
its internal structure private. And then only functions in that module 
can access the internal structure. And that's how you do encapsulation.)


Post a reply to this message

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