> A programmer instantiating a class that is _by_design_ abstract is a
> programming error and will result in an incorrect program. I think
> there is enough reason to want to stop someone from doing it, don't
> you think?
No - if a programmer makes a mistake you want them to know about it, clearly
and distinctly, with a good indication as to what the error is, right ? Since
messages to 'nil' in ObjC are legal then if someone writes this:
myObject = [MyAbstractClass new];
If you prevent the class from being instansiated then that code will run but
do nothing. On the other hand, if you let it instansiate then the program
stops with "MyAbstractClass does not implement method aMethod" when it hits
the second line.
Preventing programmers from doing the wrong thing is, in most cases, far less
important than communicating to them what they have done wrong. If you
can do both great, if you get a choice of only one then pick the latter as
it makes fault-finding a lot easier.
Well, thats my opinion anyway....
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden