GNU bug report logs - #77762
[PATCH] web: Add JSON module.

Previous Next

Package: guile;

Reported by: "Thompson, David" <dthompson2 <at> worcester.edu>

Date: Sat, 12 Apr 2025 13:16:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Tomas Volf <~@wolfsden.cz>
To: "Thompson, David" <dthompson2 <at> worcester.edu>
Cc: 77762 <at> debbugs.gnu.org
Subject: bug#77762: [PATCH] web: Add JSON module.
Date: Fri, 02 May 2025 14:03:56 +0200
"Thompson, David" <dthompson2 <at> worcester.edu> writes:

> On Sat, Apr 12, 2025 at 12:01 PM Tomas Volf <~@wolfsden.cz> wrote:
>>
>> > - null is the symbol 'null
>>
>> Out of curiosity, what are your thoughts about using #nil instead?
>
> My original patch from 10 years ago did this. Mark Weaver then
> explained to me that #nil was added specifically for the purpose of
> supporting Emacs Lisp on the Guile VM and shouldn't be used in Scheme
> code. The symbol 'null works well because there is no symbol type in
> JSON so there's no ambiguity.

Thanks for the explanation.  I asked not due to perceived ambiguity, but
due to how #nil interacts with conditions.  It would be handy to be able
to write

    (when (assq-ref data 'foo)
      ...)

instead of

    (when (not (eq? 'null (or (assq-ref data 'foo) 'null)))
      ...)

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.




This bug report was last modified 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.