all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David O'Toole <dto@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: un-deprecating CL
Date: Mon, 17 Sep 2007 00:35:28 -0400	[thread overview]
Message-ID: <m3r6kxdi3z.fsf@gnu.org> (raw)
In-Reply-To: E1IX4MV-0006uz-Ep@fencepost.gnu.org


Richard Stallman <rms@gnu.org> writes:

> destructuring-bind is ok to add, because it is simple and modular.
> Likewise `case' and `typecase'.
>
> I don't want to add CL argument lists, so no `function*' or `defun*'.

Destructuring-bind supports most of the CL argument list stuff,
including keyword arguments; this makes it simple to implement
functions that take keyword arguments, and might encourage people to
do so.

> I don't want to add `union' or `intersection' or `set-difference' or
> `subst' or `sort*' or `delete*', because they use CL keyword
> arguments.

--snip--

> `every', `substitute', `find' and `subsetp' have the ugly CL keyword
> arguments, so I don't want to add them.

It isn't clear to me what exactly is so bad about keyword arguments,
or what alternative (if any) you have in mind for dealing sensibly
with functions accepting more than one or two optional arguments. When
you want to supply `x' as just one of the optional arguments to a
function that takes several, and the one you want to supply happens
not to be the first, you end up writing things like 

(foo bar nil nil nil x)

I cringe when I have to do this. Furthermore, if the defaults are not
`nil' then you also have to look up what are acceptable values to pass
for the arguments that you did not want to specify in the first
place. For example, `make-hash-table' would arguably be harder to use
if did not employ keyword arguments, of which it takes five---and
several of the defaults are non-nil.

Speaking of which, why is it ok for a frequently-used built-in
function like make-hash-table to use keyword arguments in the first
place?

> Adding `setf' really means adding `defstruct'.  That might be a good
> feature to add, but it is too complex because of all the structure
> options.  If we get rid of most of them, `defstruct' could be simple
> enough to add.

I don't understand---defstruct is already implemented in the CL
package. Are you talking about copying that definition, removing many
of the options, and then pasting it somewhere else?

-- 
David O'Toole 
dto@gnu.org
http://dto.freeshell.org/notebook/

  parent reply	other threads:[~2007-09-17  4:35 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14 16:42 un-deprecating CL Joe Wells
2007-09-14 17:32 ` David O'Toole
2007-09-15  2:08   ` Richard Stallman
2007-09-14 19:21 ` Karl Fogel
2007-09-15  8:00   ` Eli Zaretskii
2007-09-15 18:06     ` Richard Stallman
2007-09-15 18:14       ` Leo
2007-09-15 21:56         ` Eli Zaretskii
2007-09-15 19:02       ` Joe Wells
2007-09-15 19:14         ` martin rudalics
2007-09-17  0:21           ` Richard Stallman
2007-09-17  5:58             ` martin rudalics
2007-09-15 19:41         ` T. V. Raman
2007-09-17  0:21           ` Richard Stallman
2007-09-18 14:59             ` Johan Bockgård
2007-09-19  3:18               ` Richard Stallman
2007-09-19  3:43                 ` Stefan Monnier
2007-09-20 16:34                   ` Richard Stallman
2007-09-20 18:37                     ` Stefan Monnier
2007-09-20 19:15                       ` Johan Bockgård
2007-09-21 22:32                       ` Richard Stallman
2007-09-19  3:18               ` Richard Stallman
2007-09-15 19:52         ` T. V. Raman
2007-09-17  0:21           ` Richard Stallman
2007-09-17  0:21         ` Richard Stallman
2007-09-17  2:25           ` Joe Wells
2007-09-17 15:53             ` Richard Stallman
2007-09-17 17:05               ` David O'Toole
2007-09-18  3:29                 ` Richard Stallman
2007-09-18  7:33                   ` Lennart Borgman (gmail)
2007-09-18 19:34                     ` Richard Stallman
2007-09-18 23:48                       ` David O'Toole
2007-09-19 15:49                         ` Richard Stallman
2007-09-19 21:17                           ` David O'Toole
2007-09-17  4:35           ` David O'Toole [this message]
2007-09-17 22:25             ` Richard Stallman
2007-09-17 22:25             ` Richard Stallman
2007-09-18 14:43             ` Johan Bockgård
2007-09-16 21:56       ` David O'Toole
2007-09-17  3:58         ` Richard Stallman
2007-09-16 21:46     ` David O'Toole
2007-09-16 22:22       ` Eli Zaretskii

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=m3r6kxdi3z.fsf@gnu.org \
    --to=dto@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.