GNU bug report logs -
#68030
29.1; (elisp) `pcase Macro' Reformulation with `pcase' example
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Mon, 25 Dec 2023 16:42:01 UTC
Severity: normal
Found in version 29.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68030 in the body.
You can then email your comments to 68030 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68030
; Package
emacs
.
(Mon, 25 Dec 2023 16:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 25 Dec 2023 16:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
We shouldn't try to introduce (and perhaps even motivate) the use of
`pcase' for such a "simple matching task". The `pcase' version is
many times more complex than the simple `if' version with a
single-sexp THEN and a single-sexp ELSE.
Even if the aim is to present `or', `and', `pred' and `app', a better
example should be used - something where it really _helps_ to use those
subpatterns. In the example chosen they just add noise.
[Not part of this bug report, but you might also want to move the whole
`Caveats for SYMBOL in Sequencing Patterns' to a separate node (with
`pcase' somewhere in the node name).]
In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on
AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.3803)
Configured using:
'configure --with-modules --without-dbus --with-native-compilation=aot
--without-compress-install --with-tree-sitter CFLAGS=-O2'
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB
(NATIVE_COMP present but libgccjit not available)
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Mon, 25 Dec 2023 16:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Drew Adams <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Mon, 25 Dec 2023 16:48:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 68030-done <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> We shouldn't try to introduce (and perhaps even motivate) the use of
> `pcase' for such a "simple matching task". The `pcase' version is
> many times more complex than the simple `if' version with a
> single-sexp THEN and a single-sexp ELSE.
The purpose is to start with a small example to teach the reader about
pcase. I see nothing that needs changing here.
> Even if the aim is to present `or', `and', `pred' and `app', a better
> example should be used - something where it really _helps_ to use those
> subpatterns. In the example chosen they just add noise.
Without any concrete suggestions, I don't see anything actionable here.
I'm therefore closing this bug report.
> [Not part of this bug report, but you might also want to move the whole
> `Caveats for SYMBOL in Sequencing Patterns' to a separate node (with
> `pcase' somewhere in the node name).]
I don't see any benefit in doing that.
>
> In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on
> AVALON
> Windowing system distributor 'Microsoft Corp.', version 10.0.19045
> System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.3803)
>
> Configured using:
> 'configure --with-modules --without-dbus --with-native-compilation=aot
> --without-compress-install --with-tree-sitter CFLAGS=-O2'
>
> Configured features:
> ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
> NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
> TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB
>
> (NATIVE_COMP present but libgccjit not available)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68030
; Package
emacs
.
(Tue, 26 Dec 2023 17:49:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 68030-done <at> debbugs.gnu.org (full text, mbox):
> > We shouldn't try to introduce (and perhaps
> > even motivate) the use of `pcase' for such
> > a "simple matching task". The `pcase'
> > version is many times more complex than the
> > simple `if' version with a single-sexp THEN
> > and a single-sexp ELSE.
>
> The purpose is to start with a small example to teach the
> reader about pcase. I see nothing that needs changing here.
It doesn't teach the reader about `pcase'.
It shows nothing about what `pcase' really
offers.
`pcase' is not at all about doing, in a
more complicated way, what you can do
simpler with `if'. It's about doing other
things more simply than you can with `if'.
> > Even if the aim is to present `or', `and',
> > `pred' and `app', a better example should
> > be used - something where it really _helps_
> > to use those subpatterns. In the example
> > chosen they just add noise.
>
> Without any concrete suggestions, I don't see
> anything actionable here.
Put on your Thinking Cap. You shouldn't
need any "concrete suggestions". I'm sure
you can come up with a solution if you can
understand the problem.
> I'm therefore closing this bug report.
>
> > [Not part of this bug report, but you might
> > also want to move the whole `Caveats for
> > SYMBOL in Sequencing Patterns' to a separate
> > node (with `pcase' somewhere in the node name).]
>
> I don't see any benefit in doing that.
It's a giant footnote - meta-information.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 24 Jan 2024 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 198 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.