| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| There are hundreds of reasons to extend String. Maybe you want strings to be able to archive in a special way? Maybe you need them to be initialized from a special type? Yes, in those cases, you could use a static helper function. Inelegant, but functional. More importantly, there are often times when the instance implementation and the static class methods must be implemented in the same class. This is the case that I had that originally started this thread. The problem was, an existing tool took 3 parameters: 1) The class name of the instance you want to use to represent something in a database 2) The method ON THAT CLASS that generates the representation you want for the database storage 3) The static method ON THAT CLASS that can be used to initialize a new instance from database storage There is no way to make this work without subclassing - and that is why I don't like 'final'. Everyone - please - there are language capabilities that are good and bad depending on how you use them. There are functions people may not understand or need, while others might. I was complaining about 'final' in the midst of trying to accomplish something, not to start a debate. Ken On Aug 30, 2006, at 3:57 AM, Marcin Lukasiak wrote:
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden This email sent to email@hidden
| References: | |
| >RE: Subclass final class (Boolean) ? (From: "Marcin Lukasiak" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.