|
![](/i/fill.gif) |
In article <4038f64d$1@news.povray.org>, Darren New <dne### [at] san rr com>
wrote:
> > wouldn't you (unless you want to make the language so that it does
> > not support virtual functions, which would limit its OO capabilities
> > by a whole lot).
>
> Well, then it wouldn't be OO at all, as you wouldn't have any dynamic
> dispatch.
Oh? Objective C doesn't have anything called virtual functions. It has
methods and messages instead. And they're not the same thing...the
messaging model is a bit more flexible than the member function call
model.
> > Someone will inevitably use it in the wrong way and his code can then
> > break with an updated version of the library.
>
> Interestingly enough, C# actually addresses this problem. Nice language,
> that.
Could you clarify this?
C# does sound like a good language from what I've heard, too bad it's
MS-only.
(Don't say Mono...it's incomplete, and will always be so...its existance
only gives people something to point at when claiming C# isn't MS-only.)
> That's actually what Eiffel does. You might want to look into it. It
> even goes a step farther, in that it allows you to restrict (for
> example) what values a child object is allowed to return from a member
> function it overrides.
So the superclass can define that a method returns a real value between
0 and 1, and subclass overrides must remain in that range? This is one
of Eiffel's design-by-contract features, right?
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |