RE: Convenience Methods
RE: Convenience Methods
- Subject: RE: Convenience Methods
- From: Erik Buck <email@hidden>
- Date: Tue, 25 Sep 2007 20:47:03 -0700 (PDT)
There are at least two opposing schools of thought
about the value vs. cost of static compile time type
checking.
One school says that compilers should protect
programmers and make them more productive by detecting
as many errors at compile time as possible. If the
programmer is forced into monkey puzzles with the type
system or has to add extra lines of code to work
around the type system (Ref: the "Command" pattern),
that's a small price to pay for type safety.
The other school, founded with Small-talk and
continued with languages like Python, claims that
maximum code re-use and minimal code size makes
programmers much more productive than any type
systems. Small-talk would say that there is only one
type, object, and all objects are interchangeable.
Surely, adequate testing will catch any run-time error
that a static type system might have caught and more.
My recollection is that long ago Objective-C used to
rely much more on the id type and there was not static
type checking for methods. NeXT and Apple clearly
voted for more type safety without quite going so far
and forbidding dynamic typing. Maybe the middle
ground isn't ideal in this case ?
References:
http://www.mindview.net/WebLog/log-0025
http://www.cocoabuilder.com/archive/message/cocoa/2007/5/13/183149
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden