From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Paul W. Rankin" <pwr@bydasein.com>
Cc: emacs-devel@gnu.org
Subject: Re: declare function/macro private
Date: Tue, 08 Jun 2021 11:43:53 +0200 [thread overview]
Message-ID: <87mts0ofmu.fsf@gnus.org> (raw)
In-Reply-To: <030ED6D5-BC78-4992-90C5-9EC18221F0DE@bydasein.com> (Paul W. Rankin's message of "Sun, 6 Jun 2021 22:43:25 +1000")
"Paul W. Rankin" <pwr@bydasein.com> writes:
> The "--" convention is fine and I wouldn't suggest to change/replace
> this; it's clear to people what it means once they've learnt what the
> convention means.
[...]
> Also I just dislike computer heuristics.
The "--" convention is heuristic-ey... But it is very reminiscent of
the Common Lisp foo:bar vs foo::private-bar thing (which is not a
heuristic, but a language thing).
That is, I think it's very nice to have the code be quite explicit about
what's internal and what's external, so if you're using
foo--private-thing in Emacs outside of a file called foo*.el, you know
you're doing something that may break.
This being a convention instead of a language feature does have
problems. For instance, if somebody decides to make a private function
public, all the usages have to be renamed. (declare (private ...))
avoids that.
But... I think I agree with people that this isn't really the way to
go -- the current convention provides more information than the declare
would do (most of all, it says what the prefix is).
It'd be nice if Emacs grew a real package system -- then this
private/public thing would happen naturally. But I don't think adding
`private' in and of itself is the way forward.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-06-08 9:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-06 4:27 declare function/macro private Paul W. Rankin via Emacs development discussions.
2021-06-06 7:09 ` Omar Polo
2021-06-06 7:18 ` Paul W. Rankin via Emacs development discussions.
2021-06-06 9:53 ` Lars Ingebrigtsen
2021-06-06 12:43 ` Paul W. Rankin via Emacs development discussions.
2021-06-08 9:43 ` Lars Ingebrigtsen [this message]
2021-06-08 17:26 ` Robin Tarsiger
2021-06-06 18:05 ` Stefan Monnier
2021-06-06 18:12 ` Tassilo Horn
2021-06-06 20:12 ` Stefan Monnier
2021-06-07 0:51 ` Paul W. Rankin via Emacs development discussions.
2021-06-07 1:37 ` Arthur Miller
2021-06-07 1:43 ` Paul W. Rankin via Emacs development discussions.
2021-06-07 13:38 ` Arthur Miller
2021-06-07 0:59 ` Paul W. Rankin via Emacs development discussions.
2021-06-07 2:54 ` Stefan Monnier
2021-06-07 18:24 ` Arthur Miller
-- strict thread matches above, loose matches on Subject: below --
2021-06-07 3:35 Boruch Baum
2021-06-07 4:49 ` Paul W. Rankin via Emacs development discussions.
2021-06-07 5:59 ` Stefan Monnier
2021-06-07 6:45 ` Paul W. Rankin via Emacs development discussions.
2021-06-07 12:39 ` Eli Zaretskii
2021-06-08 1:14 ` Boruch Baum
2021-06-08 4:20 ` Arthur Miller
2021-06-08 5:49 ` tomas
2021-06-08 15:46 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mts0ofmu.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=pwr@bydasein.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.