From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Poor quality documentation in edebug.el, and recursive documentation. Date: Fri, 08 May 2020 16:24:28 -0400 Message-ID: References: <20200505202048.GA15482@ACM> <20200508195326.GB6705@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22910"; 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: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 08 22:25:55 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 1jX9ZC-0005rJ-TM for ged-emacs-devel@m.gmane-mx.org; Fri, 08 May 2020 22:25:54 +0200 Original-Received: from localhost ([::1]:42592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX9ZB-00076I-Oo for ged-emacs-devel@m.gmane-mx.org; Fri, 08 May 2020 16:25:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX9Xx-0006Cf-VB for emacs-devel@gnu.org; Fri, 08 May 2020 16:24:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX9Xw-0001ID-9f for emacs-devel@gnu.org; Fri, 08 May 2020 16:24:37 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C7E93450AD4; Fri, 8 May 2020 16:24:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D3264450AB7; Fri, 8 May 2020 16:24:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1588969469; bh=U4cCDQ6fYY4RB3Mh1grUnJwKlUd7gmAVQrEzFLkEfcI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=htpaGRQZ1CJ4eAEiy0r4jO5PZ1Q81M6rbu8VctV3T0bQXltyXmVhrExpw+iyQOWvj U3OwyH5y99JfoghO+DpDg7qZVruNEOCc+gB9zdhkBCEHQNbQgxuD0RFHnyhh8fkOpe +IwuNR/iWR1FpHV7QY7BM2t5yjUUGD3vkZOtrYOCkjcASemQ+dKovXJ6GyHDlsrIz7 lAAn3RaDcmgjowukOqJk2iJoNz8s4nALDGXZigHBRO4HvleRaFj8nm7RBYopqVhw96 ztm1dSFQS2JDmlLhclJH8HKZAj5cfdsz/5jcz8iKS2A3WcbAANfkI1bqw+y/qL/bX2 LC+jsi9n1GmqQ== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 85A501202CD; Fri, 8 May 2020 16:24:29 -0400 (EDT) In-Reply-To: <20200508195326.GB6705@ACM> (Alan Mackenzie's message of "Fri, 8 May 2020 19:53:26 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/08 14:06:31 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:249323 Archived-At: >> > Access slot "def-name" of `edebug--frame' struct CL-X. [...] >> It's the name of the argument, as always. > A typical useful doc string would give information about the semantics > of the argument, saying, say, "where CL-X is a list". Hmm... but it does: it says that it's an "`edebug--frame' struct". > where I was at the beginning of the week. I don't know what a > "metaclass" is, It's a generic term from the OO crowd. It's class of a class: in languages where classes can be manipulated as normal objects, they themselves belong to a class, called the metaclass (which is hence itself a class with its own metaclass, etc...). Luckily you shouldn't need to know any of those things unless you need to dig into the implementation of Elisp's OO facilities such as `cl-defstruct`, `eieio`, or `cl-generic`, basically. > I'm still not sure what a cl-structure-class is and the > latter needs documenting coherently. I guess it would be good, yes. In the mean time, just like for a lot of the CL stuff you can start by looking it up in the HyperSpec: http://www.lispworks.com/documentation/HyperSpec/Body/t_stu_cl.htm#structure-class >> > "cl-structure-class is a type (of kind `cl-structure-class')" > >> > embedded in approximately 26 lines, none of which shed any light on what >> > a cl-structure-class is, does, or represents. > >> There actual docstring says: "The type of CL structs descriptors." >> The rest describes the fields of those CL struct descriptors (aka class >> objects). > > It most assuredly does not. It _lists_ those fields - it does not > describe them. One of these fields, for example, is called named. What > does named do? What does it represent? What's it for? None of these > questions is answered. named is undocumented, as are all the other > fields. Why? Why do you need to know? This class is used by `cl-defstruct` and pretty much nothing else, so presumably if you need to know about it you're hacking on `cl-defstruct`, and if you're hacking on `cl-defstruct` the first thing to do is to look up its documentation (unless you know it already, obviously). After that it should be trivial to guess what this `named` field is used for. In your case, you're investigating `edebug--frame`, which should not depend on the way `cl-defstruct` is implemented. Kind of like looking at the "vtables" generated by your C++ compiler. > A better way would be actually to document it. Be my guest. Stefan