• 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: Future Objective-C changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future Objective-C changes


  • Subject: Re: Future Objective-C changes
  • From: Marcel Weiher <email@hidden>
  • Date: Wed, 21 May 2003 16:35:02 +0200

and a defining local variable is nothing more than attaching some bit
of data to the local stack frame, so it has *everything* to do with
the local stack frame.

Exactly! *Declaring* the local variable has something to do with the
*local stack frame*. It has NOTHING whatsoever to do with modifying
*global* state.

On the other hand, the global graphics state has nothing to do with the
local stack-frame.

Regardless of it's merit, it's a common C++ idiom for writing exception safe code.

Obviously, and I understand the reasoning that leads to such a solution. I even thought it was a Good Thing, initially. It took me a while to realize just how much of a coding horror it is. Which in turn taught me something about the techie mind-set (including my own), something to be wary of in the future.


Most C++ programmers will find this quite natural.

Yes. Does this say something about the construct or about C++ programmers? ;-)

Of course, in an Obj-C world now where such idiom looks rather unnatural, since there is no stack based objects. This is one reason I never liked Obj-C++ to begin with, it just confuses both Obj-C and C++ folks.

I think Obj-C++ is good if you have an existing C++ code-base that you need to hook up to Objective-C. I think you are right that apart from that very well defined area it is not such a good idea.

Marcel

--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Future Objective-C changes
      • From: Chris Meyer <email@hidden>
References: 
 >Re: Future Objective-C changes (From: Joe Chan <email@hidden>)

  • Prev by Date: Re: Encapsulating methods in ObjC
  • Next by Date: Re: Calling C++ library and/or framework from Obj C
  • Previous by thread: Re: Future Objective-C changes
  • Next by thread: Re: Future Objective-C changes
  • Index(es):
    • Date
    • Thread