all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Emanuel Berg <incal@dataswamp.org>
Cc: emacs-devel@gnu.org
Subject: Re: 10 problems with Elisp, part 10
Date: Fri, 09 Aug 2024 13:46:08 +0300	[thread overview]
Message-ID: <86h6bukm8f.fsf@gnu.org> (raw)
In-Reply-To: <87le163xed.fsf@dataswamp.org> (message from Emanuel Berg on Fri,  09 Aug 2024 10:36:58 +0200)

> From: Emanuel Berg <incal@dataswamp.org>
> Date: Fri, 09 Aug 2024 10:36:58 +0200
> 
> Dr. Arne Babenhauserheide wrote:
> 
> >>   (unless end
> >>     (setq end 73))
> >>   (unless step
> >>     (setq step (min 10 (max 2 (/ end 10)))))
> >>   (unless i
> >>     (setq i 0))
> >
> > This could already be trimmed a lot:
> >
> > (setq
> >   end (or end 37)
> >   step (or step (min 10 (max 2 (/ end 10))))
> >   i (or i 0))
> >
> > → start optimizing where no syntax breakage is needed.
> 
> That's the thing, one shouldn't have to optimize anything, and
> in particular not such common and everyday things, the language
> should optimize that for you.

The above is not optimization, it is the usual Emacs Lisp style of
doing this kind of jobs.

> Please write all this in Lisp anywhere near this 88 chars, and
> then I'm even generous with the whitespace.
> 
> [
>   end  :r  0<   :d 73         :pa
>   step :rc 2-10 :d (/ end 10)    
>   i    :r  0<=  :d 0             
> ]
> 
> :r means signal error if outside of the interval.
> 
> :rc means set to min or max if outside of the interval.
> 
> Defaults should be the same for interactive and
> non-interactive use.
> 
> :pa means both M-x, C-u M-x, and C-u x M-x should work.

The very fact that you need to explain what this mean speaks volumes.

Anyway, we are not going to redesign Emacs Lisp, so this line of
discussion leads nowhere.  Please stop keeping it alive, it just adds
unnecessary noise to this already very noisy list.



  reply	other threads:[~2024-08-09 10:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 18:57 10 problems with Elisp, part 10 Abraham S.A.H. via Emacs development discussions.
2024-08-07 20:46 ` Sebastián Monía
2024-08-08  4:58 ` Eli Zaretskii
2024-08-08  5:40   ` Christopher Dimech
2024-08-08  6:00 ` Dr. Arne Babenhauserheide via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
2024-08-09  7:08 ` Emanuel Berg
2024-08-09  8:21   ` Dr. Arne Babenhauserheide
2024-08-09  8:36     ` Emanuel Berg
2024-08-09 10:46       ` Eli Zaretskii [this message]
2024-08-09 22:27         ` Emanuel Berg
2024-08-09 13:47       ` Eduardo Ochs
2024-08-09 14:03         ` Emanuel Berg
2024-08-09 22:47       ` Bob Rogers
2024-08-09 23:21         ` Emanuel Berg
2024-08-10  5:56           ` Eli Zaretskii
2024-08-11  2:12       ` Richard Stallman
2024-10-23 20:11   ` Jean Louis
2024-10-23 20:06 ` Jean Louis
2024-10-29 13:42   ` Abraham S.A.H. via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  -- strict thread matches above, loose matches on Subject: below --
2024-08-09  7:21 Johan Myréen
2024-08-06 17:38 Abraham S.A.H. via Emacs development discussions.
2024-08-07  7:44 ` Emanuel Berg
2024-08-07 11:30   ` Christopher Dimech
2024-08-04 22:27 Emacs website, Lisp, and other Jeremy Bryant
2024-08-04 22:55 ` Emanuel Berg
2024-08-05  9:23   ` Christopher Dimech
2024-08-05 12:28     ` Eli Zaretskii
2024-08-05 16:27       ` 10 problems with Elisp, part 10 (was: Re: Emacs website, Lisp, and other) Emanuel Berg
2024-08-05 16:38         ` Eli Zaretskii
2024-08-05 17:03           ` Emanuel Berg
2024-08-05 18:32             ` 10 problems with Elisp, part 10 Dr. Arne Babenhauserheide
2024-08-05 20:20               ` Emanuel Berg
2024-08-06  7:14                 ` Dr. Arne Babenhauserheide
2024-08-06 11:54                   ` Eli Zaretskii
2024-08-08  2:01                     ` Richard Stallman
2024-08-09 22:39                       ` Emanuel Berg
2024-08-13  1:28                         ` Richard Stallman
2024-08-09 22:46                     ` Emanuel Berg
2024-08-10  5:41                       ` Emanuel Berg
2024-08-10  6:09                         ` Eli Zaretskii
2024-08-13  1:28                       ` Richard Stallman
2024-08-05 18:58             ` 10 problems with Elisp, part 10 (was: Re: Emacs website, Lisp, and other) Christopher Dimech
2024-08-05 19:30               ` 10 problems with Elisp, part 10 Dr. Arne Babenhauserheide
2024-08-05 20:02                 ` Christopher Dimech
2024-08-08  2:01                   ` Richard Stallman
2024-08-06  2:28                 ` Eli Zaretskii
2024-10-23 19:25         ` 10 problems with Elisp, part 10 (was: Re: Emacs website, Lisp, and other) Jean Louis
2024-10-23 21:13           ` Emanuel Berg
2024-10-23 21:36             ` Jean Louis
2024-10-25  6:44               ` Emanuel Berg
2024-10-28  3:27                 ` 10 problems with Elisp, part 10 Joel Reicher
2024-10-24  6:48             ` Dr. Arne Babenhauserheide via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists

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=86h6bukm8f.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=incal@dataswamp.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.