Subject: bug#77762: [PATCH] web: Add JSON module.

From: Tomas Volf <[email-masked]>
Date: Fri, 02 May 2025 14:03:56 +0200

"Thompson, David" <[email-masked]> writes:

> On Sat, Apr 12, 2025 at 12:01 PM Tomas Volf <[email-masked]> 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.