unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: emacs-devel@gnu.org
Subject: Re: 10 problems with Elisp, part 10
Date: Fri, 09 Aug 2024 09:08:09 +0200	[thread overview]
Message-ID: <877ccq5g2u.fsf@dataswamp.org> (raw)
In-Reply-To: O3hwhNN--7-9@tuta.io

Abraham S.A.H." via "Emacs development discussions. wrote:

>> It doesn't take much experience to do cool things fast in
>> Python, it is a fact.
>
> I agree to disagree, Emanuel!  Sorry, but I do not think
> "Python is a generally better programming language".

Devel time faster than in Lisp, is what I'm saying.

Maybe one could have a Lisp that also was as fast or almost as
fast, if one focused on that aspect.

> However, as an Asian, I know no university in my country or
> neighbour countries teaching Lisp.

Even so.

>> No. Just think, remove this line in Lisp
>>
>> some-item))
>
> Why should  I?  Why should I  use `kill-line`?  Why not 
> removing that item with `kill-sexp`?

Indeed, be an excellent Emacs user, that is all it takes.

No, the syntax makes it harder and slower to edit for
everyone. More syntax errors, more typing.

One thing one could try is to replace boring, trivial stuff
with non-Lisp syntax.

For example setting up the interface. Here is one example from
my own code. (Note: Over one in five interfaces in the Emacs
source uses Lisp and not the `interactive' format string.)

  ;; ...
  (interactive (if (numberp current-prefix-arg)
                   (list current-prefix-arg)
                 current-prefix-arg))
  (unless end
    (setq end 73))
  (unless step
    (setq step (min 10 (max 2 (/ end 10)))))
  (unless i
    (setq i 0))
  (unless (and (numberp i)    (<= 0 i)
               (numberp end)  (<  0 end)
               (numberp step) (<  0 step))
    (error "Bogus indata"))

This is 402 chars!

But here is a 135-char solution that expresses the same:

[
  end  :range     0<   :default 73         :prefix-arg
  step :range-cut 2-10 :default (/ end 10)
  i    :range     0<=  :default 0
]

And here is a 88 char solution:

[
  end  :r  0<   :d 73         :pa
  step :rc 2-10 :d (/ end 10)
  i    :r  0<=  :d 0
]

Also with: :prompt-string (:ps), :doc-string (:ds) ...

That way, we could keep Lisps elegance and power for where
people cared about it, for example solving interesting
algorithmic problems and so on.

-- 
underground experts united
https://dataswamp.org/~incal




  parent reply	other threads:[~2024-08-09  7:08 UTC|newest]

Thread overview: 33+ 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-09  7:08 ` Emanuel Berg [this message]
2024-08-09  8:21   ` Dr. Arne Babenhauserheide
2024-08-09  8:36     ` Emanuel Berg
2024-08-09 10:46       ` Eli Zaretskii
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
  -- strict thread matches above, loose matches on Subject: below --
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

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=877ccq5g2u.fsf@dataswamp.org \
    --to=incal@dataswamp.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 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).