Hi,
Point taken. I was more talking about if you wanted your code to be portable
to pure objective c files (which granted not everyone will need). It's more
a big deal if you're going to distribute your code.
Thanks,
-Michael.
-----Original Message-----
From: Draconis
Sent: Saturday, June 08, 2013 8:36 AM
To: Gamers Discussion list
Subject: Re: [Audyssey] Who's afraid of Objective C?
Michael,
Most of the time, you don't even have to do that. Objective-C++ files, with
the extension .mm, can more or less mix and match C++ and Objective-C code
at will, provided that any Objective-C classes stay within the global
namespace.
It depends on exactly what you're doing, but since we used Objective-C++
extensively through the Draconis engine, I can definitely say that, in most
cases, you don't need to go through the steps you're talking about.
It depends on exactly what you're doing and how your project is constructed.
On Jun 8, 2013, at 7:30 AM, "Michael Taboada"
<[email protected]> wrote:
Hi Thomas,
Not quite true. If you have c++ apps that are cross platform, you could
pretty easily port them to objective c using what's called objective c++.
it's basically objective c mixed with c++. Note if you decided to go this
route that to make your files usable in regular objective c files you'd
have to make a very, very light wrapper around your c++ code, as objective
c is not compatible with c++ in and of itself, but with objective c++ it
is.
For example what you might do is what's commonly known as 'pimpl' or
'private implementation' where anywhere in the objective c header file
that you reference a c++ class, you simply put a struct pointer to that
class. That way, as objective c is backward compatible with c, and the
header files doesn't have to touch the c++ class code, all you have to do
in the objective c++ file is to cast the struct pointer to the class type
and use it as normal.
Hth,
-Michael.
-----Original Message----- From: Thomas Ward
Sent: Saturday, June 08, 2013 6:04 AM
To: Gamers Discussion list
Subject: Re: [Audyssey] Who's afraid of Objective C?
Hi Cara,
I think as far as myself is concerned I'm not so much apposed to
learning or using Objective C, but that I'd have to literally rewrite
all of my games etc from scratch to use it. Since I have software in
Python, some in C++, etc I don't like having to rewrite them in
Objective C just because Apple decided to ignore compatibility with
every single OS in the world and do their own thing. :D
Cheers!
On 6/7/13, Cara Quinn <[email protected]> wrote:
Lol! Awesome Liam! :)
To be completely honest, when I first looked at Objective C syntax I
really
didn't like it. I was used to more straight C / Java / C++ syntax so
seeing
all the brackets enclosing method calls really kind of turned me off. C++
seemed a lot more concise to me. However, after having worked in
Objective C
for a while now, some of the more longhand ways methods are named really
does help in reading code after you've written it and need to revisit it
later.
It's actually quite a bit more readable in some ways than C++ because of
the
extra wording in the method naming.
Here's an example:
In C++ I might declare a method:
void offsetLatitudeAndLongitude(double lat, double lng,double offset);
I would write the same method name in Objective C as:
-(void) offsetLatitude:(double)lat andLongitude:(double)lng
withOffset:(double)offset;
So since it's more English-like, going back and rereading that later for
me
would be a whole lot easier. :)
So there ya go, there's my two cents for now. :)
Have an awesome day!
Smiles,
Cara :)
---
View my Online Portfolio at:
http://www.onemodelplace.com/CaraQuinn
Follow me on Twitter!
https://twitter.com/ModelCara
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to
[email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the
list,
please send E-mail to [email protected].
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to
[email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the
list,
please send E-mail to [email protected].
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to
[email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].