Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: FSOCLF (Frequently-Suggested Objective-C Language Features)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSOCLF (Frequently-Suggested Objective-C Language Features)



On 30 Dec 2003, at 12:23, Helge Hess wrote:

On 30.12.2003, at 01:13, Prachi Gauriar wrote:
On Dec 29, 2003, at 3:03 PM, Greg Parker wrote:
Some common requests for new features:
1. Namespaces for classes, as seen in C++ and Java
While this is commonly requested, is it necessary?

Of course it is not necessary. But like variable scoping in blocks it is quite useful in practice and leads to better class names.

How is it useful in practice? Apart from "looking nicer"? What problem does it solve? At what cost? Comparing my experience in Java and Objective-C, namespaces don't really seem to add anything of value.

Example: instead of using
---
@interface OGoWebUIScheduler
---
@namespace org.opengroupware.webui;

@interface Scheduler
---

Looks way better to me. Of course this is just a "visual" thing - just like [a setObject:b forKey:c] looks better than a.setObjectForKey(b,c).

To me, this is actually significantly worse, because now the name is no longer descriptive. You seem to have mixed up two separate concepts, prefixing in order to avoid namespace clashes (OGo) and using a descriptive name ( WebUIScheduler). While the first could reasonably be replaced by a namespace, replacing a descriptive, intention-revealing name with something completely generic like "Scheduler" seems like an awful idea to me, just like I *much* rather have -addObjectsFromArray: versue -add:

Marcel
_______________________________________________
objc-language mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/objc-language
Do not post admin requests to the list. They will be ignored.

References: 
 >FSOCLF (Frequently-Suggested Objective-C Language Features) (From: Prachi Gauriar <email@hidden>)
 >Re: FSOCLF (Frequently-Suggested Objective-C Language Features) (From: Helge Hess <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.