Re: Future Objective-C changes
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.