From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: request for a new function, say, `sequence' Date: Thu, 27 Mar 2003 11:03:02 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303271703.LAA27696@eel.dms.auburn.edu> References: <200303230302.MAA04327@etlken.m17n.org> <200303241541.h2OFfbpa011227@rum.cs.yale.edu> <200303250015.JAA06592@etlken.m17n.org> <200303250050.JAA06631@etlken.m17n.org> <200303250057.h2P0vBj6016367@rum.cs.yale.edu> <200303250125.KAA06703@etlken.m17n.org> <32627.1048557446@theforce.Stanford.EDU> <200303250208.LAA06802@etlken.m17n.org> <1191.1048560083@theforce.Stanford.EDU> <200303250446.NAA06974@etlken.m17n.org> <200303251527.h2PFR0lO018653@rum.cs.yale.edu> <200303252311.IAA08003@etlken.m17n.org> <200303261544.h2QFi4i4022332@rum.cs.yale.edu> <200303270009.SAA27161@eel.dms.auburn.edu> <200303271520.h2RFKXbV028261@rum.cs.yale.edu> <200303271606.h2RG6KTi028510@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1048785788 16661 80.91.224.249 (27 Mar 2003 17:23:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2003 17:23:08 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Mar 27 18:23:04 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18yb3T-0004Ay-00 for ; Thu, 27 Mar 2003 18:20:43 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18yb5R-00014Q-00 for ; Thu, 27 Mar 2003 18:22:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18yaxo-0001Ol-07 for emacs-devel@quimby.gnus.org; Thu, 27 Mar 2003 12:14:52 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18yavd-0000Me-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 12:12:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18yavI-0000BA-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 12:12:16 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18yalU-0006S9-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 12:02:08 -0500 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) h2RH21B03451; Thu, 27 Mar 2003 11:02:01 -0600 (CST) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id LAA27696; Thu, 27 Mar 2003 11:03:02 -0600 (CST) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-reply-to: <200303271606.h2RG6KTi028510@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Original-cc: handa@m17n.org Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12663 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12663 Stefan Monnier wrote: > How about > > (dotimes (VAR [START END] RESULT) BODY...) > > I do not completely understand this. [...] is Elisp notation for vectors. I see that it is ambiguous because [...] is also used in such contexts to denote optional arguments. So, unless START and END are constants, a typical usage would be: (dotimes (var (vector start end) result) body...) (if I now understand correctly). Seems OK, but (dotimes (VAR COUNT [RESULT START]) BODY...)) would have the double advantage of keeping the meaning of the second argument of dotimes (and of the name dotimes) as doing something COUNT times and of allowing evaluation without an extra call to vector, list, cons or whatever. On the other hand, the semantics you proposed would be more convenient for things like: (dotimes (var [?a ?z] result) body...) So if we expect a lot of uses of that type, it would be preferable. Anyway, the first decision to be made is whether there is a sufficient need for the functionality. If yes, we can discuss the semantics. (And then both of the above, as well as some semantics suggested earlier seem OK to me.) Sincerely, Luc.