• 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: Just starting off in obj C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Just starting off in obj C


  • Subject: Re: Just starting off in obj C
  • From: j o a r <email@hidden>
  • Date: Sun, 26 Oct 2008 10:37:28 -0700


On Oct 25, 2008, at 11:45 PM, Ian Joyner wrote:

Sure -- the C runtime is brittle in the ways you mentioned and thank goodness tools like the Clang static analyzer and Valgrind are providing means of finding and eliminating such bugs.

Of course, retro-fitting static analysers to inherently unsafe languages, can only go so far. Static analysis has its limits.

I agree. I have never liked tools like lint. A well-defined language with well-implemented compilers should not need after-the-fact hacks.


I wouldn't call them hacks. For the most part they're not providing functionality missing from the compiler, they're complementing the compiler with functionality that doesn't belong in the compiler. The compiler should concern itself with the language specification, not custom conventions like:

* Parameters passed to format strings
* Memory management characteristics of objects returned from functions (retain/autorelease)
* If you called super or not in dealloc


These are all framework / library specific rules. This is one of the areas where Clang shines. That said, perhaps compilers should be extensible to allow for custom rules and whole program analysis? Not sure if integrating the two would bring any significant advantages, besides perhaps convenience, though?

Compilers also work at, well, compile time, and there are a number of problems that you just can't (!) catch at compile time no matter what general purpose imperative language that you choose. This is where unit tests and other runtime checkers, such as Valgrind, comes into play.


j o a r


_______________________________________________ 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
  • Follow-Ups:
    • Re: Just starting off in obj C
      • From: Ian Joyner <email@hidden>
References: 
 >Re: Just starting off in obj C (From: Chris Idou <email@hidden>)
 >Re: Just starting off in obj C (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Equivalent to xcconfig conditionals available?
  • Next by Date: Re: Console littered by Xcode 3.1.1 garbage collection messages
  • Previous by thread: Re: Just starting off in obj C
  • Next by thread: Re: Just starting off in obj C
  • Index(es):
    • Date
    • Thread