Spot any errors? let me know, but Unleash your pedant politely please.

Friday 16 July 2010

Please say what I'm thinking.

Was just reading Matt Gallagher's Is a virtual machine for Cocoa programming inevitable? on Cocoa With Love. I subscribe, but often don't read a lot of the posts. They're too technical for my current ability and level of interest. I want to be more interested, but I just don't have the time/inclination at the moment. I'll be reading every word of this one because I kind of hate C.

I read the introduction wanting Matt to say what I was thinking, which is essentially that C pointers suck. There are other things I dislike about the language, the curly braces and the misuse of '=' for assignment and '==' for equality, for example, but much of this is cosmetic. The pointers are a deeper issue, although there is a element of cosmetic unpleasantness about them too.

What was I thinking ? Well, in Matt's words (Yay!) :
More relevant in the long term is the one feature that Objective-C can't remove or fix: complaints about C itself, in particular C pointers.


Even though this isn't the point Matt is making, I'm reminded of Robert B. K. Dewar's lectures on Ada. I've embedded part 3 below (will remove if requested to do so)…


The key thing to take from this is the rigour of the Ada compiler compared to C, the cost of finding defect at compile time versus runtime and the amount of time spent in debugging in Ada compared to C. I'm not saying Ada should be used instead (it shouldn't), but C in particular lets things through to runtime that are going to be a bugger to find and resolve. The nature of Cocoa, object based and dynamic is a much better fit to Python. If a virtual machine is proposed, a language like Python would be much more suitable.

No comments:

Post a Comment