[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operator overloading
From: |
Philippe C.D. Robert |
Subject: |
Re: operator overloading |
Date: |
Tue, 7 Mar 2006 19:48:40 +0100 |
Hi,
On 06.03.2006, at 12:27, Marko Riedel wrote:
Hi folks,
here is a question for you GNUstep wizards out there. Can anyone
suggest
how best to simulate operator overloading, which is missing from
Objective
C? I would like to overload operators such as "add" or "multiply."
Can I
ask GCC to output its parse tree and then try to add overloading
manually?
Operator overloading is not supported by ObjC, although it would be
very helpful in some situations, e.g. when writing complex maths
code. Instead of fiddling with GCC internals I would rather use the C
preprocessor, though (even if this is far from elegant...).
BTW is there a tutorial on how to load classes at runtime (sorry if
this
is a very basic question).
The NSBundle documentation... or do you mean using the runtime
directly???
-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip