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: Sun, 06 Jun 2021 11:53:46 +0200 Message-ID: <87r1hftj2t.fsf@gnus.org> References: <0278C47F-42CE-45C4-B789-83C57DF1A191@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="31031"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Paul W. Rankin" To: "Paul W. Rankin" via "Emacs development discussions." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 11:54:28 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 1lppUB-0007oh-TE for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 11:54:27 +0200 Original-Received: from localhost ([::1]:57558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lppUA-0002FN-SZ for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 05:54:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lppTe-0001a4-6p for emacs-devel@gnu.org; Sun, 06 Jun 2021 05:53:54 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:47572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lppTb-00009e-Nw for emacs-devel@gnu.org; Sun, 06 Jun 2021 05:53:53 -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=NypW3YtGLEcJf3iw8lhrRpNTbdsyFlEfRnhXRH7A8ak=; b=kDmYK9NpvCqXC/im3X6whmm5Bf Uomlo3gnrUYNrWUQ20QfR3ViGvPjWk/dR35yny1DbLQ7K8iIYwo9HCmb5rVhfWlGeaEWzXMfdd0AP aOfAw38Yt5Ptq6CzEWp5io53m5MW8xM23T4m1EJl6Y3WpaxwkEn7kQVnPzqoW3hNATXs=; 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 1lppTX-0005BL-6A; Sun, 06 Jun 2021 11:53:50 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEW0pY7p1LT348Le y6yEemxZUEeWinn////g2+H6AAAAAWJLR0QHFmGI6wAAAAd0SU1FB+UGBgkyHNbWuVwAAAGASURB VDjLhdRLjoMwDADQSLRZT8gJ6FwATyhrFg4nwKzRTMn9jzDOjwBtVVdCiIcdB0yFUE9R3ziEeH39 Ffj4AMYoA8YftwjQhFN/XyvsIHxUMUNvcCUazsABra2u8wagfH2jDagW5TrJxS0iQrxfg+qdtJN0 JwClenmxs2NIpVI0nHGhEfGB8wEU9G6lCWd0Y4DclIFeWiKaJhfX0Fl4gyvR+MBxOWW0C2fM6zN0 w4o0UQTJoNNDuc8XJMvwF0D5bXuoO+S27JYRnzlHfeWrh1Imw5ig2gGvBJ1DIjuVDAjFoO4fiPTg w66U9k+x8/tGxFF8/+7XCEABmp8D3DOcuoIMOLyBtxkRqrzxBPwKXYJjBr+PHYT3W0fw0xBAZ4jt ujQ+stpmGb5EZSpI074DpbXSIbkuAGmuFXfvExLA9iWUDycAV+BfHHsNYJ7W2M5uTQBIY1pAKQa+ HD7gWwAoUBbVcZBCy/tnVUrpCLBvNMeh1AngE9SpuRjHjPKfYf4BJmG37PscyFwAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjEtMDYtMDZUMDk6NTA6MjgrMDA6MDBS8Y91AAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIxLTA2LTA2VDA5OjUwOjI4KzAwOjAwI6w3yQAAAABJRU5ErkJggg== X-Now-Playing: Edward L Crain's _Anthology of American Folk Music Volume 1: Ballads (2)_: "Bandit Cole Younger" In-Reply-To: <0278C47F-42CE-45C4-B789-83C57DF1A191@bydasein.com> (Paul W. Rankin's message of "Sun, 6 Jun 2021 14:27:58 +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:270470 Archived-At: "Paul W. Rankin" via "Emacs development discussions." writes: > Given we have a function/macro declare interactive-only property, > would it be worthwhile to consider a `private' property? > > Of course there's already the convention of > prefix--my-private-function, but my thinking here is that a program > could declare a function/macro as private, then the compiler could > signal a warning/error if that function appeared in a library outside > the library it was defined and declared private. The compiler could do this with "--" symbols if we wanted to, I guess. > e.g. in foo.el: > > (defun foo-private () > (declare (private "use `foo-public' instead.")) > ...) I'm not necessarily against this or anything, but I do like the "--" convention, because it makes it very explicit what's internal and what's not. On the other hand, if we had tagging like this, we could also make (say) font-lock react to this information and make it as obvious as the "--" convention. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no