emacs-devel
[Top][All Lists]
Advanced

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

Re: JSON->lisp Mapping: Hash vs AList


From: Philipp Stephani
Subject: Re: JSON->lisp Mapping: Hash vs AList
Date: Mon, 18 Dec 2017 20:59:39 +0000



Eli Zaretskii <address@hidden> schrieb am Mo., 18. Dez. 2017 um 21:19 Uhr:
> From: Philipp Stephani <address@hidden>
> Date: Mon, 18 Dec 2017 19:55:52 +0000
> Cc: address@hidden, address@hidden
>
>    @defun json-parse-string string &key (object-type @code{hash-table})
>
>  ?
>
> If that's the right thing, sure. OTOH, cl.texi uses
> @defun cl-fill seq item @t{&key :start :end}
> so probably we should use that?

No, @t is almost never right, certainly not in code sequences.

At least cl.texi uses it consistently, though.
 

>  >  >  > +The keyword argument OBJECT-TYPE specifies which Lisp type is used to
>  >  >                          ^^^^^^^^^^^
>  >  >  Shouldn't that be `:object-type' (including quotes)?
>  >  >
>  >  > Depending on whether we can use &key in a docstring in core. If so, then this one is correct, see
>  e.g.
>  >  the
>  >  > docstring of should-error.
>  >
>  >  IMO, the doc string of should-error is no less confusing than this
>  >  one, because it expects something like ":type 'foo".
>  >
>  > Arguably yes. Though that has been the convention for cl-lib functions for a while.
>
>  cl-lib enjoyed being in the shadows for too long.  I don't think we
>  should let that continue any longer, we should fix that.
>
> OK, what's your suggestion?

I thought I wrote that above.

I've attached a new version of the patch. 

Attachment: 0001-Allow-JSON-parser-functions-to-return-alists.txt
Description: Text document


reply via email to

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