From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Satyaki Das" Newsgroups: gmane.emacs.devel Subject: Re: request for a new function, say, `sequence' Date: Tue, 25 Mar 2003 12:10:17 -0800 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <24784.1048623017@theforce.Stanford.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> <4946.1048568708@theforce.Stanford.EDU> <200303250540.OAA07032@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1048623208 21719 80.91.224.249 (25 Mar 2003 20:13:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2003 20:13:28 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 25 21:13:25 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 18xun5-0005cK-00 for ; Tue, 25 Mar 2003 21:12:59 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18xuo9-0000Ve-00 for ; Tue, 25 Mar 2003 21:14:05 +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 18xumc-0000Dm-00 for emacs-devel@quimby.gnus.org; Tue, 25 Mar 2003 15:12:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18xuln-0007yR-00 for emacs-devel@gnu.org; Tue, 25 Mar 2003 15:11:39 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18xulT-0007r7-00 for emacs-devel@gnu.org; Tue, 25 Mar 2003 15:11:19 -0500 Original-Received: from chicory.stanford.edu ([171.64.73.212]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xuka-00075Y-00 for emacs-devel@gnu.org; Tue, 25 Mar 2003 15:10:24 -0500 Original-Received: from dwarka.stanford.edu (ev-01-st2435.Stanford.EDU [128.12.141.17]) by chicory.Stanford.EDU (8.11.6/8.11.6) with ESMTP id h2PKAPx29201; Tue, 25 Mar 2003 12:10:25 -0800 Original-Received: from troodon.stanford.edu (troodon.Stanford.EDU [171.64.73.3]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by dwarka.stanford.edu (Postfix) with ESMTP id 16EBF9D14; Tue, 25 Mar 2003 12:10:27 -0800 (PST) Original-Received: from [127.0.0.1] (helo=theforce.Stanford.EDU) by troodon.stanford.edu with esmtp (Exim 4.12) id 18xukT-0006Rm-00; Tue, 25 Mar 2003 12:10:17 -0800 Original-To: Kenichi Handa In-Reply-To: <200303250540.OAA07032@etlken.m17n.org> X-Mailer: MH-E 7.2+cvs; nmh 1.1; GNU Emacs 21.3.50.4 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEV6WFm6q6TDta7i0syt lI43GBqCo6Z5AAACUElEQVR4nGWUS3LbMAyGoZTamwy6N0EdICZyAFKF9+pMef+r9Aclp5OpMpElf MQbEKUk88oxRol+y3iLieIFmIKlCaZcyB9yircxxmE9TcC4UU9+gNfhBACvG2RMNo9M+RiLQJ4N1M jvGfKDiMaB51QhykZwl+BgUVyVes5lgu4gruNN9STUI1vEP8VucT30um4jGOPPAMx4/HqBT8QcDSF N0L4UtK4OWug8wY//QIwEe+39EovU5+jMANCAyine1hH220BEF+AAp7TXNsg6nxopex4BwQyKRPu2 59E9C8mEPpA21OPdYzFZF4CO6maYE0PRYG49gjxfAKYAHi3oo6206M/fWThdoNpKb1rRxKL3N3RZX gAuUJXCu+o9IIQ6AZPi7Cv3rS2cqkRPkFTzu+Y2a8/7wkUzX0D1MdajoFgWLJaKDnbudwcf6O4JYo IGADo1AcGPqFipqQg7YG9TVW6oFAwXHzQmD3eDiVwbrWicWclF4JdE0kfSh9GStjUAaJ2WAKSqbDR 8eHG1DlvongMYQgu8HXgn+wZwsJ3ykDyLnhz4k3U0SBx0rblHIQxrYbaAkSVoIQac8/3wLerW0FaU GK3a3YDvx1wvnAx0rsh+LtjsR/JE6dwQ+gbk81ocbImvpNYXyPQFXOozOUGxfwB1AyiXj0aXLR8Hd RcKgB1tX74J85BP52xJkcMZLH6SfxpKBUAN+FJx8McNSYGponVmfZrylS4eVfIJ8OpRm+A59gyNjP AwE91moRwsI/jXIfpMyWbBFyGsCJeeh39d4l8MyK9PYySVOgAAAABJRU5ErkJggg== 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:12611 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12611 Kenichi Handa writes: > In article <4946.1048568708@theforce.Stanford.EDU>, "Satyaki Das" writes: > >> (defun dev-charseq (from &optional to) > >> (if (null to) (setq to from)) > >> (mapcar (function (lambda (x) (indian-glyph-char x 'devanagari))) > >> (devanagari-range from to))) > > > (defun dev-charseq (lower &optional upper) > > (if (null upper) (setq upper lower)) > > (loop for x from lower to upper > > collect (indian-glyph-char x 'devanagiri))) > > It's not the point. How to use a list returned by `range' > (or `sequence') and how to make such a list is a different > thing. I am trying to show that by using existing macros and functions we can express the algorithms as clearly and succintly as with the new `range'. Do you have a counter-example to this? > Of course, we can implement the functionality of `range' by > using loop, while, dotimes, etc. But, it doesn't mean that > we don't need a simpler/convenient function `range'. IMO, a new builtin function is needed if and only if it makes writing code easier or makes it simpler. I think calling the new function `sequence' or `range' is a mistake. Lisp already has the functions `string' and `vector' which are data type constructors. Either of the suggested names sound like a new data type (in fact there is already a data type called sequence and a predicate sequencep) and so inconsistent with the current naming conventions. So I suggest that a more descriptive name be chosen -- for instance something like `make-sequence-of-numbers'. Thanks, Satyaki