emacs-devel
[Top][All Lists]
Advanced

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

Re: Objective C coding style


From: Jan Djärv
Subject: Re: Objective C coding style
Date: Fri, 13 Jul 2012 12:13:30 +0200

Hello.

12 jul 2012 kl. 18:52 skrev Samuel Bronson:

> 
> On Jul 12, 2012, at 5:15 AM, Jan Djärv wrote:
> 
>> Hello.
>> 
>> 12 jul 2012 kl. 03:15 skrev Samuel Bronson:
>> 
>>> I've noticed that the Objective C code of the NeXTstep port doesn't have a 
>>> very consistent style.  I expect this is something to do with the fact that 
>>> (standards.info) doesn't cover Objective C.  Would it be appropriate to 
>>> adopt the GNUstep coding style?
>> 
>> How does that style look?  Is it "compatible" with the GNU C-style, for 
>> example w.r.t. braces?
> 
> Yes.  The GNUstep coding standards make normative reference to the GNU coding 
> standards, summarize some of the more important rules, and lay down rules 
> regarding the additional constructs and namespaces found in Objective C.
> 
> For example, they dictate where the whitespace should go in method 
> signatures, how message expressions may be indentented, and how classes and 
> methods are to be named.  There are a few GNUstep-specific rules (like 
> prefixing GNUstep-only class names with GS), but those are easy to spot and 
> ignore.
> 
> You can take a look at 
> <http://www.gnustep.org/resources/documentation/Developer/CodingStandards/coding-standards.pdf>,
>  or at 
> <http://www.gnustep.org/resources/documentation/Developer/CodingStandards/coding-standards_3.html>
>  and 
> <http://www.gnustep.org/resources/documentation/Developer/CodingStandards/coding-standards_7.html>.

I think it would be a good addition, but I guess it is up to the cc-mode 
developers.  There is currently no ObjC-style in cc-mode.  But ObjC is not well 
handeled by cc-mode (c-defun-name does not work at all with ObjC for example), 
so I am not optimistic.

Another question is if it should be the default for just the Emacs project or 
globally.

        Jan D.




reply via email to

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