Re: C question for you old guys ;-)
Re: C question for you old guys ;-)
- Subject: Re: C question for you old guys ;-)
- From: Eric Wang <email@hidden>
- Date: Wed, 11 Jun 2003 14:51:32 -0400
In conclusion (hopefully),
I think if there's one thing we can all derive from this thread, it's to be
judicious in your use of macros, especially when other people have to read
through your code. My initial reaction to defining "is" to be "==" was that
it was a great way to avoid making assignment errors when instead you meant
to compare. However, after reading some of the well thought-out
counter-arguments against that type of usage, I decided it was probably not
such a good idea if I wanted others to be able to understand my code.
Apologies to those who may find this discussion boring. I found it
especially relevant to my Cocoa work. Just the other day, I was working
through the DragNDropOutlineView example in /Developer/Examples/AppKit. It
was difficult for me to digest because the author uses macros like
NODE_DATA(n) and SAFENODE(n) throughout his code. I only hope Apple can take
the points raised in this discussion into consideration when writing sample
code in the future.
Eric Wang
_______________________________________________
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.