all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Samuel Bronson <naesten@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Objective C coding style
Date: Fri, 13 Jul 2012 12:13:30 +0200	[thread overview]
Message-ID: <9E73583E-59CB-4C64-86B0-7F0D910E7EF2@swipnet.se> (raw)
In-Reply-To: <61999986-005B-4BA6-BBC7-8A585EB04895@gmail.com>

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	other threads:[~2012-07-13 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12  1:15 Objective C coding style Samuel Bronson
2012-07-12  9:15 ` Jan Djärv
2012-07-12 16:52   ` Samuel Bronson
2012-07-13 10:13     ` Jan Djärv [this message]
2012-07-13 15:54       ` Glenn Morris
2012-07-14  1:51         ` Leo
2012-07-13 17:10       ` Glenn Morris
2012-07-14  9:09         ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E73583E-59CB-4C64-86B0-7F0D910E7EF2@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=naesten@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.