From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Mattias Engdegård" <mattias.engdegard@gmail.com>,
"Andrea Corallo" <acorallo@gnu.org>,
casouri@gmail.com, "Stefan Kangas" <stefankangas@gmail.com>,
70007@debbugs.gnu.org
Subject: bug#70007: [PATCH] native JSON encoder
Date: Sun, 25 Aug 2024 13:55:53 -0400 [thread overview]
Message-ID: <jwvmsl0bj8a.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <867cc5mbq3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 25 Aug 2024 08:07:48 +0300")
>> > Since this could potentially (albeit unlikely) break someone's code,
>> > I'm okay with making this change, but with a twist: let's have a
>> > variable which could be let-bound around the call to json-serialize,
>> > to make the result a multibyte string instead of the default unibyte.
>> > This is so if someone comes back crying that we broke his/her code,
>> > they could have an easy fire escape.
>> Sure, but it's a bit annoying to saddle us with some baggage that we never
>> expect to be actually used.
>> And for that matter, it's no easier to bind a variable around the call
>> than putting a call to `decode-coding-string` around it, is it? We could
>> describe that in NEWS.
The variable solution has one advantage: users can (setq ... t) in their
`.emacs` to keep old code working, tho potentially at the cost of
breaking new code.
Another option is to introduce a new name (that outputs a unicode
string) and obsolete the old one. 🙂
But just making a breaking change is not that bad: ELisp has evolved to
be pretty good at making code magically work for both encoded and
decoded strings.
>> The null option is to do nothing and stick to what we have now.
>> It's not a terrible choice either.
Returning an encoded strings is something we do want to avoid in the
long run, so we might as well bite the bullet now.
> Let's see what others think about this. Stefan, Stefan, and Andrea:
> any opinions wrt what, if anything, we should do about this on the
> emacs-30 branch?
I vote for breaking compatibility.
Stefan
next prev parent reply other threads:[~2024-08-25 17:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 15:33 bug#70007: [PATCH] native JSON encoder Mattias Engdegård
2024-03-26 16:46 ` Eli Zaretskii
2024-03-27 12:46 ` Mattias Engdegård
2024-03-27 15:49 ` Mattias Engdegård
2024-03-27 17:40 ` Eli Zaretskii
2024-03-27 18:57 ` Mattias Engdegård
2024-03-27 19:05 ` Eli Zaretskii
2024-03-28 20:59 ` Mattias Engdegård
2024-03-29 6:04 ` Eli Zaretskii
2024-03-30 11:41 ` Mattias Engdegård
2024-03-30 13:22 ` Eli Zaretskii
2024-03-30 14:22 ` Mattias Engdegård
2024-03-30 16:14 ` Richard Copley
2024-03-30 16:40 ` Eli Zaretskii
2024-03-30 23:29 ` Richard Copley
2024-03-30 16:45 ` Andy Moreton
2024-03-30 20:36 ` Corwin Brust
2024-03-30 16:37 ` Eli Zaretskii
2024-03-30 20:21 ` Mattias Engdegård
2024-04-02 14:13 ` Mattias Engdegård
2024-04-02 16:13 ` Eli Zaretskii
2024-04-02 17:19 ` Mattias Engdegård
2024-08-24 15:33 ` Mattias Engdegård
2024-08-24 16:14 ` Eli Zaretskii
2024-08-24 19:45 ` Mattias Engdegård
2024-08-25 5:07 ` Eli Zaretskii
2024-08-25 17:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-08-25 18:26 ` Eli Zaretskii
2024-08-25 19:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-31 22:15 ` Stefan Kangas
2024-09-07 7:26 ` Eli Zaretskii
2024-09-07 15:48 ` Andrea Corallo
2024-09-07 15:52 ` Eli Zaretskii
2024-09-08 18:33 ` Mattias Engdegård
2024-08-25 20:08 ` Mattias Engdegård
2024-08-31 9:45 ` Eli Zaretskii
2024-03-28 19:16 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmsl0bj8a.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=70007@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=mattias.engdegard@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).