From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: The FIXME in `dotimes' Date: Wed, 07 Sep 2022 15:26:51 +0000 Message-ID: <87illzjjd0.fsf@posteo.net> References: <874jxjeb6i.fsf@posteo.net> <186D93BC-1654-4D3A-B9AC-03819DFDD6D9@acm.org> <87wnafjof6.fsf@posteo.net> <5F6C02DB-55F2-4AA2-8706-4BF38449AEAF@acm.org> <87o7vrnu65.fsf@posteo.net> Mime-Version: 1.0 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="23333"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 07 17:27:57 2022 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 1oVwy4-0005tb-Ik for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Sep 2022 17:27:56 +0200 Original-Received: from localhost ([::1]:40736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVwy3-0006vg-Dk for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Sep 2022 11:27:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVwxC-0005T7-5C for emacs-devel@gnu.org; Wed, 07 Sep 2022 11:27:02 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:51231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVwx6-0008Du-MX for emacs-devel@gnu.org; Wed, 07 Sep 2022 11:27:01 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 35F64240027 for ; Wed, 7 Sep 2022 17:26:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662564414; bh=GGrHWBhvTMdVHAcY7R/why/Y9QyHis32tZkGnpK95kA=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=DUJ2yef7991zUIw6z3iujvYsYaz/PiH+oTa1uAGTg1JPVjrUYZdr5Wr5w4KBK+kJJ CvtCJ1+/1FCnKtYc/mk2B/8h6wRrah4Qz12qXjikuT3fkeBcR7SQcf62MH7RJq40Pm 3JqdSH0qU6AGeLAYgJtACl61ZjXDHkPo4OlipG7a12HHRLkJyFxLBNOu4xaFUyD8Kt vO8QjsXt8w9KLFgRc4w8+o7W0DGETQLSPoIO6BBhyTrgtkPcTRUujSRZPWb4nNvzD+ lAjlPyfFIjTQhb8CaQBUn4qb7jE42NwzwNleQQk9cZtdoJfH8edipJ7pPekx6Dd0nm me2GS6urBsX9Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MN5hX72H4z9rxb; Wed, 7 Sep 2022 17:26:52 +0200 (CEST) In-Reply-To: (Drew Adams's message of "Wed, 7 Sep 2022 15:18:58 +0000") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:294848 Archived-At: Drew Adams writes: >> >> (dotimes (count) ...) >> > >> > Lisp syntax rarely make the first element optional, and in this case >> > it's both the first and the last one: >> > >> > (dotimes ([VAR] COUNT [RESULT]) BODY...) >> > >> > which is a bit alien, and it's perhaps not worth the trouble for just >> > omitting an underscore? >> > >> >> (dotimes count ...) >> > >> > That wouldn't allow for arbitrary expressions so it's of limited >> > utility (and Lisp-alien, again). There's also the risk that someone >> > will eventually replace a variable by a function call, turning >> > (dotimes x ...) into (dotimes (f x) ...). >>=20 >> I agree, the idea was not well thought out and not worth the >> complication. > > In addition to what's been said - It's not bad, > other things being equal, to keep it more or > less in sync with what it's taken from, which > is Common Lisp DOTIMES (and which apparently > was inspired by Interlisp's RPTQ). Interesting, I was not familiar with this history: (RPT n form) [Function] Evaluates the expression form, n times. Returns the value of the last evaluation. If n < 6, form is not evaluated, and RPT returns NIL. Before each evaluation, the local variable RPTN is bound to the number of evaluations yet to take place. This variable can be referenced within form. For example, (RPT 10 '(PRINT RPTN)) will print the numbers 10, 9, =E2=80=A2 =E2=80=A2 =E2=80=A2 1, and * return 1, (RPTQ n FORMi form 2 ... form n ) [NLambda NoSp read Function] Nlambda-nospread version of RPT: n is evaluated, form, are noL Returns the value of the last evaluation of form n . From: https://archive.org/details/bitsavers_xeroxinternceManualOct1983_5230= 2609/page/n119/mode/2up