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: Vibhav Pant
Subject: Re: JSON->lisp Mapping: Hash vs AList
Date: Tue, 19 Dec 2017 09:20:54 +0530

On Tue, Dec 19, 2017 at 2:29 AM, Philipp Stephani <address@hidden> wrote:
>
>
> Eli Zaretskii <address@hidden> schrieb am Mo., 18. Dez. 2017 um 21:19 Uhr:
>>
>> >  >  >  > +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.

fns.c has `get_key_arg', which accomplishes what json_parse_object_type is doing
here, and allows the list of keyword arguments to be extended (like in
`make-hash-table`). Do you think that could be used here instead?

Thanks,
Vibhav

-- 
Vibhav Pant
address@hidden



reply via email to

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