emacs-devel
[Top][All Lists]
Advanced

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

Re: Instead of pcase


From: Eli Zaretskii
Subject: Re: Instead of pcase
Date: Thu, 30 Nov 2023 21:26:48 +0200

> From: Lynn Winebarger <owinebar@gmail.com>
> Date: Thu, 30 Nov 2023 14:14:04 -0500
> Cc: Dmitry Gutov <dmitry@gutov.dev>, Philip Kaludercic <philipk@posteo.net>, 
>  emacs-devel <emacs-devel@gnu.org>
> 
>    > > >          > (`(,hookfun ,start ,end ,collection . ,plist)
> 
>    > I would think the author is simply emphasizing that [perse is] parsing an
>    > entity in an association list for which hookfun is a key.
> 
>  You may well be right about per intensions, and it is possible that a
>  person who already fully understands what this code is doing would
>  have realized that immediately.
> 
>  But a person who is just starting to look at this code, and reads that
>  function first, is likely to be impeded in starting to reach that sort
>  of understanding.
> 
> I have to respectfully disagree - dotted pair notation is a pretty 
> fundamental part of LISP syntax,
> regardless of dialect.

I think you are missing the point.  The point is that pcase has so
many semi-magical syntax features that use punctuation characters in
creative ways that every extra punctuation character presents a
puzzle.  Faced with

  (`(,hookfun . ,start ,end))

one immediately asks himself why the period, where in "normal" Lisp
expressions it would be completely redundant?  The fact that it is
there then leaves one wondering whether that period has some "magical"
meaning.

That is the basic problem with every unusual syntax, and the reason
why introducing such DSLs is a disadvantage.



reply via email to

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