emacs-devel
[Top][All Lists]
Advanced

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

Re: Regexp bytecode disassembler


From: Eli Zaretskii
Subject: Re: Regexp bytecode disassembler
Date: Sat, 21 Mar 2020 22:30:49 +0200

> From: Štěpán Němec <address@hidden>
> Cc: Mattias Engdegård <address@hidden>,
>   address@hidden
> Date: Sat, 21 Mar 2020 21:16:02 +0100
> 
> Do you mean you would prefer to use `cond' and rewrite all those clauses
> to something like the following?
> 
> (cond
>  ((eql opcode 0) (cons 'no-op 1))
>  ((eql opcode 1) (cons 'succeed 1))

Yes.

> Maybe readability is much more subjective than I thought, but I find the
> latter very suboptimal, to say the least.

Why "suboptimal"?

> Also, isn't "just selecting from a list of fixed values" precisely the
> reason to use some sort of case/switch instead of the general `cond'?

'cond' _is_ a case/switch construct.

> Certainly `pcase' can also be useful in more complicated use cases, but
> it will expand to the cond form anyway, so I also don't see any
> performance concerns.

I said nothing about the performance.



reply via email to

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