Re: Just starting off in obj C
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