help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: (*) -> 1


From: Jean Louis
Subject: Re: (*) -> 1
Date: Thu, 19 Jan 2023 17:54:16 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* Michael Heerdegen <michael_heerdegen@web.de> [2023-01-19 16:56]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > Did you find it? If you did, let me know. I do not know how to find
> > that.
> 
> Yes, I did.  After approximately 1 minute for every function I tried.
> Believe it or not (I guess you don't believe it and add something weird
> to your list instead that nobody can...etc. instead of starting to invest
> your own time to really try to understand).

You found examples I am searching, though you can't provide
references where (*) is useful.

And I said it is mystery made by Gods. Super beings who for unknown
reasons know everything, and do what they want, without knowledge
available for us human. 😉

Did you maybe find this in Emacs sources?

-*- mode: grep; default-directory: "~/Programming/Software/emacs/" -*-
Grep started at Thu Jan 19 17:44:12

find -H . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path 
\*/MCVS -o -path \*/.src -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o 
-path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) 
-prune -o \! -type d \( -name .\#\* -o -name \*.beam -o -name \*.vee -o -name 
\*.jam -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.lbin -o -name 
\*.so -o -name \*.a -o -name \*.ln -o -name \*.blg -o -name \*.bbl -o -name 
\*.elc -o -name \*.lof -o -name \*.glo -o -name \*.idx -o -name \*.lot -o -name 
\*.fmt -o -name \*.tfm -o -name \*.class -o -name \*.fas -o -name \*.lib -o 
-name \*.mem -o -name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name 
\*.pfsl -o -name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name 
\*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl -o -name 
\*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name \*.wx64fsl -o -name 
\*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o -name \*.fsl -o -name \*.dxl -o 
-name \*.lo -o -name \*.la -o -name \*.gmo -o -name \*.mo -o -name \*.toc -o 
-name \*.aux -o -name \*.cp -o -name \*.fn -o -name \*.ky -o -name \*.pg -o 
-name \*.tp -o -name \*.vr -o -name \*.cps -o -name \*.fns -o -name \*.kys -o 
-name \*.pgs -o -name \*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) 
-prune -o  -type f \( -iname \*.el \) -exec grep --color=auto -i -nH --null -e 
\"\(\\\*\)\" \{\} +
./lisp/progmodes/verilog-mode.el:9311:    ;; To advance past either "(*)" or 
"(* ... *)" don't forward past first *
./lisp/progmodes/verilog-mode.el:9783:         ;; To advance past either "(*)" 
or "(* ... *)" don't forward past first *
./lisp/progmodes/verilog-mode.el:9977:  ;; To advance past either "(*)" or "(* 
... *)" don't forward past first *
./lisp/wid-edit.el:2569:  :on "(*)"
./lisp/international/latin1-disp.el:2319:          (?\ "(*)")

Grep finished with 5 matches found at Thu Jan 19 17:44:48

I was reading about macros on Reddit

Why does lisp allow AND/OR operators to have 0 or 1 operands? : lisp:
https://www.reddit.com/r/lisp/comments/p3o25t/comment/h8vru39/

And I found some example of macro, it seems only that it saves some
time to programmer to write shorter macro rather than little longer
macro

https://www.reddit.com/r/lisp/comments/p3o25t/why_does_lisp_allow_andor_operators_to_have_0_or/h8vru39/?context=8&depth=9

But apart from similar mathematical explanations which do not lead to
answer how is it useful to somebody in Lisp, I did not find
enlightenment.

I can read by "stylwarning" user:

> It makes generalizing things easier and debugging easier. It also
> follows the arithmetic functions like + and * which allow zero or
> more arguments.

I can't find useful Lisp expression of "generalizing easier" with (*)
or "debugging easier" with (*).

> Simple example: I can comment out parts of an ABD/OR while debugging
> without having to rewrite the whole condition if I’m left with fewer
> than 2 cases.

That person indicates that the purpose would be temporary sketching of
functions. Though that I cannot get confirmed. For any bug in
programming language one could find some invented other purpose, why
not. It does not mean that authors intended it for that purpose of
sketching.

> A more complex example would involve writing macros. Say I’m writing
> a macro and I have an accumulated list of conditions CX I must
> satisfy. It is nice to be able to write

> `(and ,@cx)

> and not the comparatively annoying

> (cond
>   ((null cx) `t)
>   ((null (cdr cx)) (car cx))
>   (t `(and ,@cx)))



-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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