[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: of applications for gnustep...

From: Philip Mötteli
Subject: Re: of applications for gnustep...
Date: Fri, 13 Jun 2003 20:49:29 +0200

Am Freitag, 13.06.03, um 18:57 Uhr (Europe/Zurich) schrieb Chris B. Vetter:
On Fri, 13 Jun 2003 08:32:01 +0200
Philip Mötteli <address@hidden> wrote:

I know, we've been through this before ...

Yes, I seem to remember this too.   :-)

It's a marriage
In my eyes, it's not ieven a marriage. It's just, that you don't need
a bridge.

Yes, that's true.

However, C++ is an abomination. It's horrible syntax lacks an intuitive
way to use it (call it style, interface, whatever), it lacks a grammar
specifying the language and as a result you can't even tell if a given
line of code is valid...

C++ completely misses the point what OO is all about. Yes, I'm referring
to Alan Kay's legendary comment:

        I invented the term 'object oriented programming' and I can tell
        you I didn't have C++ in mind.

C++ is one big mess of afterthoughts. C++ is evil and should be buried
at midnight under a full moon in an abandoned graveyard. And best be
forgotten as well.

I do completely agree. And I would even add something: As someone, who believes, that the most important part of an oo-program is its design: It would be impossible for me to make any project in C++, because the language is so little oo, that every design is just a huge tinkering with, in other languages not needed, design patterns. It becomes an unmaintainable mess.

Why I bother?

Yes, Objective-C++ will allow you to use existing libraries and
frameworks like WebCore -- which shouldn't have been written in the
first place (in Objective-C++ that is).

You mean the authors of KHTML shouldn't have written it in C++ or Apple should have written an ObjC-"KTHTML"?

My worst fear is that people starting to program in Objective-C will see
Objective-C++ code and assume that it is valid Objective-C.

I'm not so pessimistic. I don't think, that any ObjC programmer, even one, that comes from a C++ background would like to write one more line of code, than absolutely needed, in C++. So you usually end up with having a wrapper object, that contains C++ and at the same time ObjC ivars. And in one direction from this object, everything is C++ and in the other direction, everything is ObjC. So except if the newbie is only looking at the wrapper class, I don't think this is a problem.

I have no problem with mixing Foobar.m and Barfoo.cpp in one project.
However, I do have a problem with Foobar.mm (or whatever today's file
extension for Objective-C++ is).

Well writing a wrapper in C wouldn't be any nicer to look at and would need much more effort, not to talk about implementing the whole thing yourself.

Am Freitag, 13.06.03, um 19:23 Uhr (Europe/Zurich) schrieb Mondragon, Ian:
as someone that's had to deal with objc++ in a realworld setting,

Me too, I fortunately only had to deal with it once, so far.

i can say
that it can be both very ugly

I completely agree.

and very troublesome.

As I already say, I try to concentrate the mixing in as few classes as possible. So, in my case I ended up with about 3 classes. Which wasn't so troublesome.

sure, there are some
perks to it, but i would only recommend active objc++ development in a
dire-need, last-resort type of situation.

Absolutely! If I have two almost equal libraries, I would always prefer the one written in ObjC. But in my case, there's only one library and it's written in C++. My longterm goal though, would be to rewrite it smoothly in ObjC. But at the moment, I just do not have the time for such a project. Especially, because I also need to reengineer it (I have no documentation).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]