From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Opaque objects and Emacs documentation Date: Fri, 17 Jul 2020 20:00:40 -0400 Message-ID: References: <20200712184908.13140.5739@vcs0.savannah.gnu.org> <20200712184909.BBC61209B1@vcs0.savannah.gnu.org> <7bf4d6ef-c0ec-43dc-ad5d-f6e81422ad90@yandex.ru> <83zh84m5ws.fsf@gnu.org> <3dd1c224-69b2-40af-5b2e-43a310253632@yandex.ru> <83tuybmtxs.fsf@gnu.org> <859f594b-1343-6d26-e1ac-7157c44eb56c@yandex.ru> <83a6zyk4tt.fsf@gnu.org> <6edffb7d-7708-534f-93ad-bf9180f5e0ed@yandex.ru> <57619ed5-49d5-d2a5-f205-8ea722d7f703@yandex.ru> <2374efeb-9ed8-1a7f-d508-fbafc726aa18@yandex.ru> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16369"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 18 02:01:30 2020 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 1jwaIE-000499-OF for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jul 2020 02:01:30 +0200 Original-Received: from localhost ([::1]:53860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwaID-0004pS-Kr for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jul 2020 20:01:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwaHU-0004OX-Uu for emacs-devel@gnu.org; Fri, 17 Jul 2020 20:00:45 -0400 Original-Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:39649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jwaHT-0002G8-9a for emacs-devel@gnu.org; Fri, 17 Jul 2020 20:00:44 -0400 Original-Received: by mail-qt1-x832.google.com with SMTP id o38so8974675qtf.6 for ; Fri, 17 Jul 2020 17:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AAO4CcpzNt6VpwTHl5DCamN+/nOe+EohcspWjHh3dFY=; b=QaKIxGbrjYdmtLv97l7IueoU6SaV7kG3M9wKtDTaLT6cAIuiuQspWSxsqnIkZ7GQE6 0Pb6zpxRGGsHWTeAgoQNJNm+KJI7urQP3bk5ajqMxYxsoOnmEX0HCU7jDB30jt6A93b3 /E/3IYPJDJXRA+iza9ydnekuHasUh/wtoIhDTaKajGS/SEw1pA1SmLa11QMO8pjybTJ+ 4aSTVQ+2om5vOS+bvlEUeMdwpIbv3J9hHB5RiJEizZ0Z27Gidl22Vv4Gxr6J4KTEozH6 Ok6j9WmgcEAZ13oZsZiEkTLrnwPGwhGOAZ2l83EU9/4rxVZZsCEZJbb1dCoBIMDeAXOX kbMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AAO4CcpzNt6VpwTHl5DCamN+/nOe+EohcspWjHh3dFY=; b=ZPdP0F8Ip8ZcJKfvs8yeuCk0sae70cFjk+X4LaPQT1rAYnGEJC78RH/l/kbl8vzuu0 q6qshBg5uMsaHTtdH22TWw59K6hUS1zI6gAsr0Qs9MhQfstToplHpXq8pnqiVy0bYN5O R02d/jG139HbO3bd5h741LzEOV1FzLqxa9Z5SYpxCc8cVSVmUaum474HUSqphV/HpSGE GcK1wjyEgU3zACL6tRUmWEGBzaXBxd9g9mGqscvaVUjyWcM5FLwTqSM+1Y82/fplXPeN 6BNF59tKeThDZF/AyALBuJWsHi0KH/wVoRJrJQ90CfKMOS0CehEXgwtRM+o/ekoMiLdv XUVA== X-Gm-Message-State: AOAM530FBR6erMts4lCDgRfHrZ9fvlYn1oT89WGn4pqkSDG3K9qww+dZ kCHqzc669xCOsKPNELvx5bM= X-Google-Smtp-Source: ABdhPJxcNLYO8nlgUnshyASC39T7tUCMuwdYSNzl3cqc55z9uFibJqXAj0+Lj6y3d4+pAxGDLCKP/g== X-Received: by 2002:ac8:2f7b:: with SMTP id k56mr13329727qta.239.1595030441877; Fri, 17 Jul 2020 17:00:41 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:c541:bf5d:6969:544d? ([2601:98a:4200:9210:c541:bf5d:6969:544d]) by smtp.gmail.com with ESMTPSA id g145sm11074457qke.17.2020.07.17.17.00.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jul 2020 17:00:41 -0700 (PDT) In-Reply-To: <2374efeb-9ed8-1a7f-d508-fbafc726aa18@yandex.ru> X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=casouri@gmail.com; helo=mail-qt1-x832.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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:253054 Archived-At: > On Jul 17, 2020, at 3:22 PM, Dmitry Gutov wrote: >=20 > On 17.07.2020 17:26, Gregory Heytings via Emacs development = discussions. wrote: >> Of course I did. But as it happens, this difference does not exist = in Emacs. Remember that one of the direct inspirations of Emacs were = Lisp machines, in which the user can read and modify almost every piece = of code on the fly, from the lowest to the highest level. In such a = system, there can be no difference between "internal" and "external" = documentation. >=20 > Why not? >=20 > Given that Lisp allows one to expect any value, and jump to any = implementation, and debug any function, I would say that actually = _lowers_ the need to document things, in general, not the other way = around, like in environments which you can't inspect and thus have to = rely solely on documentation. For the return value, I think documenting the return value is better = than not doing so. Sure, I can evaluate the function and see the return = value, but reading off the documentation is much easier. Why make other = people=E2=80=99s life harder? For documentation in general, I think the right thing to do is to = document the function, clearly state that this is =E2=80=9Cinternal=E2=80=9D= and shouldn=E2=80=99t be depended upon, and explain the reason why (or = just say =E2=80=9Csee doctoring of xxx for why=E2=80=9D). I don=E2=80=99t = see why saying nothing is better than being explicit in documentation. >=20 > As for internal vs external difference, I believe it's still here, as = with any programming language. The latter should be much shorter. There = is no need to dump all internal details on somebody who just wants to = use a library. It's simply counter-productive. >=20 As it happens to Emacs (and other free software), users often _are_ = developers. Library authors should document their code to make it as = easy as possible for others to look at the code and understand what it = does, and start hacking on it. IOW, one writes documentation not merely = for users, but for his fellow developers. (I guess this doesn=E2=80=99t = apply to personal projects, but Emacs is as collaborative as it gets, so = the point should still hold.) Yuan