unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Fu Yuan <casouri@gmail.com>
To: emacs-devel@gnu.org
Subject: Naming conventions for eieio slot accessors
Date: Sat, 3 Nov 2018 17:43:02 -0400	[thread overview]
Message-ID: <CAO0xp5y=-u76AU-PBxQr=iFjMXkDcjz7jxEdy3zAbJtF70An+w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Hi,

I'm writing a package which takes advantage of eieio.
When defining classes, I couldn't figure out how to name
the accessors.

First, should I use prefixes? Second, if I use a prefix,
should I use a double dash (--) or single dash (-)?

Say I'm writing a package called uikit.el and I have a class
`uikit-view' with a slot `name'.

Should I write

    (defclass uikit-view ()
      ((name
        :accessor uikit--name-of)))

or

    (defclass uikit-view ()
      ((name
        :accessor uikit-name-of)))

or

    (defclass uikit-view ()
      ((name
        :accessor name-of)))

Thanks,
Sincerely, Yuan

[-- Attachment #2: Type: text/html, Size: 3112 bytes --]

             reply	other threads:[~2018-11-03 21:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-03 21:43 Fu Yuan [this message]
2018-11-04 15:14 ` Naming conventions for eieio slot accessors Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAO0xp5y=-u76AU-PBxQr=iFjMXkDcjz7jxEdy3zAbJtF70An+w@mail.gmail.com' \
    --to=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).