[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: request for a new function, say, `sequence'
From: |
Satyaki Das |
Subject: |
Re: request for a new function, say, `sequence' |
Date: |
Tue, 25 Mar 2003 12:10:17 -0800 |
Kenichi Handa <address@hidden> writes:
> In article <address@hidden>, "Satyaki Das" <address@hidden> 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
- Re: request for a new function, say, `sequence', (continued)
- Re: request for a new function, say, `sequence', Luc Teirlinck, 2003/03/24
- Re: request for a new function, say, `sequence', Luc Teirlinck, 2003/03/24
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/24
- Re: request for a new function, say, `sequence', Luc Teirlinck, 2003/03/24
- Re: request for a new function, say, `sequence', Satyaki Das, 2003/03/24
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/24
- Re: request for a new function, say, `sequence', Satyaki Das, 2003/03/24
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/24
- Re: request for a new function, say, `sequence', Satyaki Das, 2003/03/25
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/25
- Re: request for a new function, say, `sequence',
Satyaki Das <=
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/25
- Re: request for a new function, say, `sequence', Satyaki Das, 2003/03/25
- Re: request for a new function, say, `sequence', Luc Teirlinck, 2003/03/25
- Re: request for a new function, say, `sequence', Edward O'Connor, 2003/03/26
- Re: request for a new function, say, `sequence', Thien-Thi Nguyen, 2003/03/26
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/26
- Re: request for a new function, say, `sequence', Richard Stallman, 2003/03/26
- Re: request for a new function, say, `sequence', Stefan Monnier, 2003/03/25
- Re: request for a new function, say, `sequence', Kenichi Handa, 2003/03/25
- Re: request for a new function, say, `sequence', Miles Bader, 2003/03/25