emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shrinking the C core


From: Richard Stallman
Subject: Re: Shrinking the C core
Date: Sun, 17 Sep 2023 19:03:20 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > (defun foo (&optional who-am-I)
  > >   (let ((who-am-I (or who-am-I "foo")))
  > >     (message "I am %s." who-am-I)))
  > >
  > > Is that really better than typing:
  > >
  > > (cl-defun foo (&optional (who-am-I "foo"))
  > >   (message "I am %s." who-am-I))

In Emavs Lisp you can write

(defun foo  (&optional who-am-I)
  (message "I am %s." (or who-am-I "foo")))

which is just as simple as the cl-defun method.

I have no objection to the feature of default values for optional
arguments.  It does not make code harder to understand.

The reason I did not implement that in 1984 was to keep Emacs Lisp's
implementation smaller and finish it sooner.  The latter is no longer
pertinent.  The former reason may still be valid, because implementing
this will add some coimplexity.  Is it worth its cost?  I don't know.


  
-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]