forward decls vs #import
forward decls vs #import
- Subject: forward decls vs #import
- From: Luther Baker <email@hidden>
- Date: Thu, 14 Mar 2013 18:51:09 -0500
Given today's computing power, is there a strong case that can be made for
or against the general use of forward declarations?
I grew up using them as a best practice in C++ projects ... but more
recently, several seniors Obj-C devs have suggested that they prefer
#import in the .h files.
Initially, I thought this might be related to the prevalence of Java or C#
(which don't deal with such things) ... but the suggestion today was that
forward decls was actually unnecessary typing, not considered a best
practice ... and that, indeed, #importing in the .h file could potentially
actually help weed out bad code.
Am I just from another era?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden