swarm-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [swarm-hackers] Naming conventions


From: Nima Talebi
Subject: Re: [swarm-hackers] Naming conventions
Date: Tue, 17 Nov 2009 18:03:58 +1100

As I get my head around this - I will definitely document the hell out of this framework - for my own piece of mind, and hopefully for others...

At the moment however I'm still learning - and the best way to learn for me is to just get my hands dirty, try things, and ask stupid questions - but I'm documenting as I go, I'll start putting it up into the wiki as soon as I have my branch of heatbugs run in a stable, leak-free, efficient, etc - by that time my hope is that my goal No. 1 is accomplished - i.e., understand 20% of swarm with 80% confidence, and 80% of Swarm with 20% confidence. :)

Nima

On Tue, Nov 17, 2009 at 5:47 PM, Bill Northcott <address@hidden> wrote:
On 17/11/2009, at 3:59 PM, Scott Christley wrote:

> Gosh!  How dare Apple make up a convention after Swarm was written!  They could have at least consulted us  ;-D
>
> We subclass very few of Apple's classes, only NSObject actually, so we should be okay.

which takes me back to the question I asked a few days back:

As I understand the Objective-C class structure, the root object as created in the runtime is Object and NSObject is a subclass of Object.

As I understood the old version of Swarm it separately subclassed Object, thus avoiding adopting NSObject protocols.

Am I correct to understand that your latest code creates the Swarm classes as subclasses of NSObject?  Is this what the openstep build flag does?

Do the resulting Swarm objects understand both 'new' and 'create' instantiation methods?  (I understand that mixing them is a quick way to a crash.)  Would this mean that they are 'first class' Cocoa objects, but that one should never invoke a Cocoa method on a Swarm object even though introspection would show it as available?

IMHO this all needs some documentation.  Maybe Nima might have his Wiki pages as part of the Swarm Wiki so that they might form a basis for such documentation.

Cheers
Bill

PS  The use of underscore for private methods is in GNUstep coding standards in June 1996 (http://www.gnustep.org/resources/documentation/Developer/CodingStandards/coding-standards.pdf).  So I expect Swarm just adopted it like all other Objective-C coders, before anyone thought too hard about the implications.




--
Nima Talebi
web: http://ai.autonomy.net.au/People/Nima
gpg: B51D 1F18 D8E2 B702 B027 23A4 E06B DAC1 BE70 ADC0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]