• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cross-platform audio software dev
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross-platform audio software dev


  • Subject: Re: cross-platform audio software dev
  • From: Marc Vaillant <email@hidden>
  • Date: Mon, 29 Dec 2008 19:49:53 -0500
  • Mail-followup-to: Hamish Allan <email@hidden>, Marc Vaillant <email@hidden>, John Michael Zorko <email@hidden>, email@hidden

On Sat, Dec 27, 2008 at 01:31:19PM +0000, Hamish Allan wrote:
> On Sat, Dec 27, 2008 at 2:32 AM, Marc Vaillant <email@hidden> wrote:
>
> > In what way is it less natural?  I think that John has the right idea
> > here. One can likely write cleaner, more maintainable interfaces (not to
> > mention core implmentation) for their code in C++ than C that can easily
> > be bridged to objc via objc++.  More natural? I don't know, but
> > certainly better programming practice.
>
> In my opinion, coding in Obj-C++ is not particularly natural because
> C++ and Obj-C objects cannot be used interchangeably.

Well, other than toll-free bridging you can't with C objects either.  I
doubt many people are building C interfaces and toll-free bridging
them to objc.

>
> If you think that interfaces in C++ are cleaner than those in C, why
> do you suppose Apple chose C for Core Foundation?

I have no idea. I--like many others I'm sure--avoid CF when I can. Every
OOP like C interface I've tried would have been much better had it been
written in a proper OOP language.    Good C++ interfaces result in
safer, more maintainable code.  And by using inlining and templates, for
example, you can write C++ code that pays little to no penalty over C.

>
> > Why keep someone from using C++ simply because it will be bridged to
> > objc in one port of the application?  If you have some aversion to
> > objc++, then your high level API can be C around your C++ if you really
> > want.
>
> Sure, and for all I know, Apple have written the guts of CoreAudio
> (phew, back ontopic!) in C++ and simply presented a C interface to it.
> I don't much care, as long as I don't have to use Obj-C++. I don't
> mean to "keep" anyone from using C++ for their back-end; I just
> wouldn't put it in the same class as C for platform independence.

Every C compiler I can think of is also bundled with a C++ compiler.
I don't see that forcing someone to use C++ instead of C would be a
limitation, because in general the interfaces will be significantly
safer to use.  Here's what the bot over at ##c at irc.freenode.net (I
repeat, this is ##c NOT ##c++) has to say about the purpose of C:

"c is a low level language designed to make assembly "easier", useful for
device drivers or operating systems. Thusly, one has to maintain
buffers, memory, and various low level information. C is not meant to be
used for everyday applications, a common misconception."

Let me say that I love Obj-C and I'm sorry to have gone way off topic
here but when I hang out in mac dev places including #iphone-dev and
#macdev, I hear a lot of C++ bashing by people who haven't given it a
chance.  It was invented by a smart person and is used my many smart
people.  At the very least, it is to be respected.

Marc
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >cross-platform audio software dev (From: Maissam Barkeshli <email@hidden>)
 >Re: cross-platform audio software dev (From: John Michael Zorko <email@hidden>)
 >Re: cross-platform audio software dev (From: "Hamish Allan" <email@hidden>)
 >Re: cross-platform audio software dev (From: Marc Vaillant <email@hidden>)
 >Re: cross-platform audio software dev (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: Re: Problem with TremoloUnit example and Component Manager
  • Next by Date: OpenALExample fails on PPC
  • Previous by thread: Re: cross-platform audio software dev
  • Next by thread: Re: cross-platform audio software dev
  • Index(es):
    • Date
    • Thread