From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: declare function/macro private Date: Tue, 08 Jun 2021 11:43:53 +0200 Message-ID: <87mts0ofmu.fsf@gnus.org> References: <0278C47F-42CE-45C4-B789-83C57DF1A191@bydasein.com> <87r1hftj2t.fsf@gnus.org> <030ED6D5-BC78-4992-90C5-9EC18221F0DE@bydasein.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5615"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: "Paul W. Rankin" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 08 11:54:05 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqYQv-0001Fg-MM for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Jun 2021 11:54:05 +0200 Original-Received: from localhost ([::1]:46862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqYQu-0007Kw-Jy for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Jun 2021 05:54:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqYHE-0002wy-M3 for emacs-devel@gnu.org; Tue, 08 Jun 2021 05:44:05 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:42784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqYH9-0003ms-DJ for emacs-devel@gnu.org; Tue, 08 Jun 2021 05:44:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3ZN/6Vqnc6RnPLc4v8bT/dTN/MRpfVZ2vAyYYNRDGr4=; b=kwu+uXzW4QHHEqZk68dNpgMokt 4XEdPo9fYa0io9shslnmLg15BZaD4jAbxEIymB7OiIsjDq7CwUUK0E3efTHZQJIE+09Ww8Xth0lRm Osm8NNv+iY4OIT98jSJNbSjlmE6p2WqAOJAxSJgwGQixd4yx4PCLvhGHZb3lyiPyB75s=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqYH3-0007Kx-FW; Tue, 08 Jun 2021 11:43:57 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEVsdXsdFBTh08v/ //8dPTZQAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+UGCAkgL/Et 36oAAAFbSURBVCjPTdG9bsIwEAfwAxUJeaJRIiGmlgn5KRIEQzOFyNehT1DxFFEm5KkdWJiCpUru /yl751BElA//ch92HJoxE02YuSEifZQKN8LRI3IF39Kenh+Q0lT3GuaS0qsRTQJXcu0P7g5X0i3S yIl4g2Nugd0jtMZxkxA1cqiWcm9Cl2rKldy36NKklRkKPl7mE8H+bRsLrrOoKGg6zHibDVrjqL9O uPZgrdn0seIaUeDyjYl7wa+CjJcGH1ONcGlxKjRtJtglNJkdtIHBlXkBRF3VGq/sOttDGjjyPy7v jIemtb54zwfrQ9oqe26ziIum8WHN7SoGk9KqwMZgOCbwoqgt4meC+26WMosF7Znzr7wXACS/se2p g4dA9rwOp5cxEhtZsF8DQYB5UQMWehBwFuj7BJ0EYwNFxHiQFYRxHGjqC4vQjxiMfDaN7Ug+vJah 0fYELxH843RH+ANNCdcrFLJgDgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNi0wOFQwOTozMjo0 NyswMDowMK4UGs4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDYtMDhUMDk6MzI6NDcrMDA6MDDf SaJyAAAAAElFTkSuQmCC X-Now-Playing: Mimi Goese and Ben Neill's _Life You Are_: "You4ia" In-Reply-To: <030ED6D5-BC78-4992-90C5-9EC18221F0DE@bydasein.com> (Paul W. Rankin's message of "Sun, 6 Jun 2021 22:43:25 +1000") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270559 Archived-At: "Paul W. Rankin" 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