emacs-devel
[Top][All Lists]
Advanced

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

Re: Naming conventions for eieio slot accessors


From: Stefan Monnier
Subject: Re: Naming conventions for eieio slot accessors
Date: Sun, 04 Nov 2018 10:14:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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

The accessor is a function, so it should at least follow the same naming
convention as used by other functions (e.g. use a "uikit-" or "uikit--"
prefix depending on whether you want to announce it as private or not).

After that, I don't think there are many more conventions to follow
because it's not used very often, so it seems nobody's come up with
a clear convention yet.  I guess you could follow the
"<typename>-<fieldname>" convention used in cl-defstruct.


        Stefan




reply via email to

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