Re: Objective-C and it's future
Re: Objective-C and it's future
- Subject: Re: Objective-C and it's future
- From: Thomas Davie <email@hidden>
- Date: Sat, 8 Jul 2006 02:40:39 +0100
On 8 Jul 2006, at 02:35, Jon Hendry wrote:
". So
what's against having this descriptive power in the language when
it's very useful for checking the correctness of the program. "
But how often do you run into problems because you didn't have this
kind of checking?
I don't think it ever happened to me in about 8 years of
professional Objective-C work.
Very often. 90% of the time I remove something from a container
class I get the compiler warning me that it might not respond to the
method I'm asking it to respond to, and have to make a cast, that I
know is type safe, but the compiler does not. I would much rather
have the compiler do this inference for me, because firstly, it stops
me from making mistakes, and secondly it saves me a lot of code
making casts that do nothing.
Of note, when I'm writing Objective-C I spend a lot of my time
tracking down annoying bugs, usually relating to memory management
and usually the problem is that I've released something that wasn't
what I expected it to be. This is exactly the kind of error that a
stronger type system would catch. I've yet to spend any time
tracking down runtime bugs that were not a "logical flaw" (i.e. me
misinterpreting my model for how a program should run) when writing a
Haskell (strongly typed functional language) program.
Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden