all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: monnier+gnu/emacs@rum.cs.yale.edu
Subject: Re: request for a new function, say, `sequence'
Date: Wed, 26 Mar 2003 08:11:37 +0900 (JST)	[thread overview]
Message-ID: <200303252311.IAA08003@etlken.m17n.org> (raw)
In-Reply-To: <200303251527.h2PFR0lO018653@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)

In article <200303251527.h2PFR0lO018653@rum.cs.yale.edu>, "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> 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)))

> But in this example as well a variant of `dotimes' would work just as well
> and would avoid the unnecessary consing.

Modify the resulting list of devanagari-range destructively
will also avoid the unnecessary consing.

> Emacs is not very good at efficiently consing+GCing, so
> it's good to avoid such things when it can be done without
> impacting the readbility (Emacs-21 is dog slow on my
> 266Mhz machine).

Yes, I know.  But the main reason for my proposal is for
readability.  Currently, the above function is used mainly
for defining a data in defvar, so the speed is not that
important.  On the other hand, XXX-util.el (especially the
data definition parts) must be read and modified by native
XXX users who may not be familiar with lisp.  So, it's very
important to provide easy-to-understand data definition
parts.

> Also, all the examples I've seen use lists.  Given my background in
> type-systems, I must say that I don't like functions that returns either
> a list or a vector or a string depending on some extra arg.  If we
> want a function for convenience (rather than performance), then
> returning a list is good enough.  You can always pass the result
> to `string' or to `vector' if you want something else.

As far as I see the current usage, a function returning a
list is enough.  So, I don't insist on having TYPE argument.

> Anyway, blue is the color for my bykeshed, what is yours ?

What is "bykeshed"?  My dictionary doesn't have that word.

> will show you that CL is used all over the place, including in files that
> are pre-loaded (though fewer of them, admittedly).  As long as CL is only
> needed when byte-compiling the file, it's OK (i.e. if it's wrapped in
> `eval-when-compile').  At least that was RMS' official position last time
> this was brought up.

Thank you for clarifying that.  Ok, I'll use 
    (eval-when-compile (require 'cl)
in a place that is appropriate.

---
Ken'ichi HANDA
handa@m17n.org

  reply	other threads:[~2003-03-25 23:11 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-23  3:02 request for a new function, say, `sequence' Kenichi Handa
2003-03-24 15:41 ` Stefan Monnier
2003-03-25  0:15   ` Kenichi Handa
2003-03-25  0:50     ` Kenichi Handa
2003-03-25  0:57       ` Stefan Monnier
2003-03-25  1:25         ` Kenichi Handa
2003-03-25  1:47           ` Luc Teirlinck
2003-03-25  1:51             ` Luc Teirlinck
2003-03-25  1:59             ` Kenichi Handa
2003-03-25  2:29               ` Luc Teirlinck
2003-03-25  1:57           ` Satyaki Das
2003-03-25  2:08             ` Kenichi Handa
2003-03-25  2:41               ` Satyaki Das
2003-03-25  4:46                 ` Kenichi Handa
2003-03-25  5:05                   ` Satyaki Das
2003-03-25  5:40                     ` Kenichi Handa
2003-03-25 20:10                       ` Satyaki Das
2003-03-26  0:18                         ` Kenichi Handa
2003-03-26  1:44                           ` Satyaki Das
2003-03-26  2:38                           ` Luc Teirlinck
2003-03-26  7:31                             ` Edward O'Connor
2003-03-26  8:48                               ` Thien-Thi Nguyen
2003-03-26 12:18                                 ` Kenichi Handa
2003-03-27  3:30                                   ` Richard Stallman
2003-04-03  2:54                                     ` Kenichi Handa
2003-04-03  3:44                                       ` Miles Bader
2003-04-03 22:52                                         ` Richard Stallman
2003-04-03 10:41                                       ` Thien-Thi Nguyen
2003-04-04  2:11                                         ` Vinicius Jose Latorre
2003-04-04 22:23                                           ` Richard Stallman
2003-04-05  2:10                                             ` Vinicius Jose Latorre
2003-04-06  2:00                                               ` Richard Stallman
2003-04-08  8:10                                               ` Kenichi Handa
2003-04-03 22:52                                       ` Richard Stallman
2003-03-25 15:27                   ` Stefan Monnier
2003-03-25 23:11                     ` Kenichi Handa [this message]
2003-03-26  0:11                       ` Miles Bader
2003-03-26  0:40                         ` Luc Teirlinck
2003-03-26  1:34                           ` Miles Bader
2003-03-26  0:54                         ` Kenichi Handa
2003-03-26  1:29                           ` Miles Bader
2003-03-26 15:44                       ` Stefan Monnier
2003-03-27  0:09                         ` Luc Teirlinck
2003-03-27 15:20                           ` Stefan Monnier
2003-03-27 15:53                             ` Luc Teirlinck
2003-03-27 16:06                               ` Stefan Monnier
2003-03-27 17:03                                 ` Luc Teirlinck
2003-03-27 17:08                                   ` Stefan Monnier
2003-03-26  2:41               ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200303252311.IAA08003@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=monnier+gnu/emacs@rum.cs.yale.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.