Theocacao
Leopard
Design Element
Comment on "CocoaHeads: Objective-C 2.0"
by Scott Stevenson — Sep 21
@Nicko: If I've got three variables called "startTime", "delay" and "endTime" then when the heck do you think that the "+" operator is going to do in this context?
I see the value in what you're describing and I'm not totally closed to having my mind changed, but this particular case of the plus symbol, I think, highlights one important area.

If you consider 64-bit versus 32-bit, and whether the variable is a pointer or a simple value type, plus can already mean a number of things. Adding "whatever the programming thinks plus means" is an additional burden.

Not that I'm saying it's a deal breaker, I just don't think it's trivial. For what it's worth, I think it would be really nice to have some string conveniences in the syntax since that's much less likely to be ambigious. I'm not as sold on mathematical operations.

If I've got three variables called "startTime", "delay" and "endTime" then when the heck do you think that the "+" operator is going to do in this context?
I can imagine what it's supposed to do, but trying to find the difference between my intent and what the computer thinks is happening has left me with countless hours in front of the debugger. I'm not saying operator overloading doesn't have value, I'm just curious if the value is enough to overpower the drawbacks.
Back to "CocoaHeads: Objective-C 2.0"
Design Element

Copyright © Scott Stevenson 2004-2015