unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emanuel Berg <incal@dataswamp.org>, emacs-devel@gnu.org
Subject: how to speed up Lisp devel time
Date: Fri, 9 Aug 2024 20:54:19 +0200	[thread overview]
Message-ID: <trinity-ef12f20a-ffe9-43a9-a077-1011c9a0b458-1723229658962@3c-app-mailcom-bs13> (raw)
In-Reply-To: <8634ndlgox.fsf@gnu.org>


> Sent: Saturday, August 10, 2024 at 6:00 AM
> From: "Eli Zaretskii" <eliz@gnu.org>
> To: "Emanuel Berg" <incal@dataswamp.org>
> Cc: emacs-devel@gnu.org
> Subject: Re: how to speed up Lisp devel time
>
> > From: Emanuel Berg <incal@dataswamp.org>
> > Date: Fri, 09 Aug 2024 18:19:58 +0200
> >
> > (defun draw-scale (&optional end step i)
> >   (interactive (if (numberp current-prefix-arg)
> >                    (list current-prefix-arg)
> >                  current-prefix-arg))
>
> Using "p" doesn't prevent you from testing the value of
> current-prefix-arg, if that is what you want to do.
>
> But in general, having commands with more than one optional argument
> (two when the command acts on a region) is not recommended, because it
> complicates the interactive usage.

This complexity is not inherently negative, and there are compelling
reasons to embrace it in certain situations.  Commands with multiple
optional arguments offer greater flexibility.

They allow users to fine-tune the behavior of a command without needing
multiple versions of the same command.  For example, a command that
processes text in a region might need to handle different edge cases or
modes of operation.  Providing multiple optional arguments, users can
specify exactly how they want the command to behave, which can be more
efficient and powerful than using multiple commands or a simpler interface.
And more advanced users often seek out commands that provide granular control.

In an environment like Emacs, which is known for its powerful, customizable,
and sometimes complex commands, advanced users often appreciate the ability
to use optional arguments.

Embrace complexity, complexity is not inherently bad, it's a trade-off.
Proper documentation, intuitive default behaviors, and a clear understanding
of when and how to use optional arguments can ensure that this complexity
enhances the user experience rather than detracting from it.




  reply	other threads:[~2024-08-09 18:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  7:16 how to speed up Lisp devel time Emanuel Berg
2024-08-09  7:24 ` Eli Zaretskii
2024-08-09  7:39   ` Emanuel Berg
2024-08-09 10:43     ` Eli Zaretskii
2024-08-09 11:18       ` Emanuel Berg
2024-08-09 12:02         ` Eli Zaretskii
2024-08-09 13:54           ` Emanuel Berg
2024-08-09 14:58             ` Eli Zaretskii
2024-08-09 16:03               ` Emanuel Berg
2024-08-09 16:16                 ` Emanuel Berg
2024-08-09 17:54                   ` Eli Zaretskii
2024-08-09 18:56                     ` Christopher Dimech
2024-08-09 21:57                       ` Emanuel Berg
2024-08-09 21:47                     ` Emanuel Berg
2024-08-09 17:27                 ` Yuri Khan
2024-08-09 21:21                   ` Emanuel Berg
2024-08-10  2:14                   ` Emanuel Berg
2024-08-10  6:01                     ` Yuri Khan
2024-08-10  6:08                       ` Emanuel Berg
2024-08-10  6:44                         ` Yuri Khan
2024-08-10  7:22                           ` Emanuel Berg
2024-08-10  7:51                             ` Emanuel Berg
2024-08-10  4:32                   ` Emanuel Berg
2024-08-10  5:58                     ` Eli Zaretskii
2024-08-09 14:59             ` Eduardo Ochs
2024-08-09 16:19               ` Emanuel Berg
2024-08-09 18:00                 ` Eli Zaretskii
2024-08-09 18:54                   ` Christopher Dimech [this message]
2024-08-09 22:17                     ` Emanuel Berg
2024-08-09 22:00                   ` Emanuel Berg
2024-08-09  8:24   ` Emanuel Berg
2024-08-09 10:36     ` Christopher Dimech

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=trinity-ef12f20a-ffe9-43a9-a077-1011c9a0b458-1723229658962@3c-app-mailcom-bs13 \
    --to=dimech@gmx.com \
    --cc=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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).