• 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: XCode Falls Short - for now
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode Falls Short - for now


  • Subject: Re: XCode Falls Short - for now
  • From: David Walters <email@hidden>
  • Date: Tue, 31 Oct 2006 08:18:39 +1100


On 31/10/2006, at 7:18 AM, Dave Camp wrote:

On Oct 30, 2006, at 7:23 AM, Scott Ribe wrote:

I agree.  It is a recent thing.

Even after years, I remain *shocked* at how hard many Windows IDEs make it
to see your header and implementation next to each other. It is sheer UI
*stupidity* to not make this easy.


And of course, V$ and Anjuta make it easy, by giving you control-tab, even if you have code windows appearing in a MDI way (no tabs) - and V$ has a feature that any young IDE should revere and meditate on - the BACK BUTTON, which works within a single file - this is an incredibly useful thing. I bet Xcode does have it, and someone will tell me how to work it. (or it will appear in 3.01_)

And, of course, many of the IDEs out there are now oriented toward Java,
where this is not an issue.

Maybe this explains Windows engineers tendency to put all their C++ code in the .h files? Almost every Windows port job I work on has 50-75% of the C++ source inlined in the .h files. I've never been able to get an explanation as to why I see this so often... that's got to put a lot of pressure on the linker to strip out all the duplicate code generated in each object file.

It's a messy business, programming. A lot of my "first-pass" prototype code is heavy on the headers, because I have a habit of just writing out my definition because I can. 
Of course, you start using a few #includes in that .h file and it soon becomes apparent that you need to put your definitions in a separate file so this file can be included by something else that doesn't need all the other stuff you #included for the definitions in this class. Header heirarchies can be a headache, can't they? Hmmm.

Having said that, when I first started in c++ i wrote bunches of stuff in header files, which experience taught me was much better off in definition files, that declaration files were for declaring things. That's why there's a semicolon after a class (struct / enum) declaration - only definition blocks need no trailing semi-colon. Declaratives (because they are statements) need a semi-colon. It made much more sense to start thinking of .cpp files as definition files and .h files as declaration files. I don't think everybody thinks of them that way.

That's my theory anyway.

OR ... I'd wager the code you're talking about was written for a client, on a deadline. That code tends to be less drafted than say, the next version of some production app where the client is six or seven figures and the code-audit is truly agonizing - for those projects we drafted, redrafted, circulated coding guidelines, had friday afternoon best-practice discussions, etc. If it was just some quick and dirty thing that was going to solve problems that day, for a few weeks or months, barring the company policies dictating the bare minimum "layout" or "design" we had to do, the less we "over-engineered" those apps the better, it meant we could get back to the big projects. That doesn't mean we completely ignored them, they got testing and QA, just not a whole bunch of formatting / optimising.

Where did you see your header-heavy files?


_david


 _______________________________________________
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

References: 
 >Re: XCode Falls Short - for now (From: Scott Ribe <email@hidden>)
 >Re: XCode Falls Short - for now (From: Dave Camp <email@hidden>)

  • Prev by Date: Re: debugger question related to CodeWarrior/DevStudio
  • Next by Date: Re: XCode Falls Short - for now
  • Previous by thread: Re: XCode Falls Short - for now
  • Next by thread: Re: XCode Falls Short - for now
  • Index(es):
    • Date
    • Thread