[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Did I miss something about structures and function handles
From: |
kensmith |
Subject: |
Re: Did I miss something about structures and function handles |
Date: |
Sat, 18 Aug 2007 20:19:23 -0700 |
User-agent: |
KMail/1.9.1 |
On Saturday 18 August 2007 18:38, Jordi Gutiérrez Hermoso wrote:
> On 18/08/07, James Sherman Jr. <address@hidden> wrote:
> > But I don't have a good grasp of what OOP really and truly means,
> > so the 90% of OOP comment by kensmith confuses me.
>
> Polymorphism. This is the essence of OOP, and often not emphasised
> enough.
I would characterize polymorphism as "a main advantage" or as "the main
feature" but not as the essence. I have written OO programs that
didn't use it. This may seem strange at first but for some problems
the OO way of thinking simply works better.
> As kensmith suggests, the "this" pointer in C++ is one way to get
> polymorphism working. I can't follow the discussion exactly, but if
> indeed Octave has something like C++'s "this" pointer, then we may be
> well on the route to having OOP in Octave.
>
> Of course, having Matlab-compatible OOP is probably still quite a
> different matter.
Imagine that the "this" was "$$$$". I'm fairly sure that $$$$ isn't a
MatLab symbol. All MatLab code could still run in octave. Some octave
could wouldn't run in MatLab. At least it wouldn't until they added
the $$$$ because it is such a great idea.
>
> - Jordi G. H.
--
address@hidden