Re: Spoiled by Java IDEs
Re: Spoiled by Java IDEs
- Subject: Re: Spoiled by Java IDEs
- From: Jens Alfke <email@hidden>
- Date: Fri, 18 Jul 2008 11:45:09 -0700
On 18 Jul '08, at 7:18 AM, Graham Perks wrote:
I too l sorely miss the completion tools. Add a method prototype, it
should absolutely kick out a stub. Copy and paste? What?? Even
better, I write a method, add it to the .h for me.
There are some predefined macros for common methods. Inside an
@implementation context you can type "init" or "dealloc" and press the
completion key and it will spit out a generic -init or -dealloc method
for you. There are more of these (and they're documented in the Xcode
guide) but those are the ones I remember.
If I need a property added to my class, why do I need to hand-write
THREE lines (!? baffles me how complex a simple property is. C#
buggered that up too.)
Here's why.
#1: The @property declaration. It's kind of a given that you need
that :)
#2: The instance variable declaration. As you point out, not needed in
64-bit, but needed in 32-bit due to fragile-base-class issues (any
subclass needs to be able to compute this class's instance data size
given only the information in the .h file. There is no way around this
without breaking binary compatibility with existing code.)
#3: The @synthesize declaration in the .m file. You need this because
there are at least three ways to implement a property (synthesized,
dynamic or explicit method) and you have to tell the compiler which
one you're using. Otherwise, if you left out the @synthesize line, the
compiler couldn't tell if you wanted it to synthesize a method, leave
it out entirely (dynamic), or maybe you meant to implement an accessor
but forgot to write it.
[I've said it before: Any time you think a released piece of software
does something totally the wrong way, and you can obviously see the
right way it should have been done, there are almost certainly issues
you don't know about (or haven't thought through) that make the
situation much more complex. Real software, unlike the stuff we wave
our hands about, is built out of compromises.]
I totally agree with you that assistance from the IDE for writing
these would be nice. Unfortunately everyone has ten or twenty pet
features that they think Xcode really, really needs (I'm no
exception), and what's worse, that list of features is different for
every user. So there's no way they can add what every user wants.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden