2016-02-06 17:50 GMT+03:00 Bram Moolenaar <[email protected]>:
>
>> What do you think about this?
>
> I don't want to spend much time discussing this.  v:null and v:none are
> needed just like JavaScript has null and undefined.
>
> I was thinking of taking this a step further to a more efficient
> encoding that is similar to Javascript.  Unfortunately I haven't been
> able to find a specification. I thought it was used in combination with
> protocol buffers.  Besides empty entries in an array, it also removes
> the quotes around object item names.  It's more efficient and doesn't
> drop any functionality.  We could add protocol buffer support, but let's
> leave that for some other time.
>
> Also keep in mind that when you want to stick to the JSON standard
> (well, one of them), you should not write the string yourself but use a
> library to create it.  Arguments that it's hard to type or spot a
> mistake are hardly relevant.

JSON is used not only for communication. All arguments like “hard to
spot a mistake” apply to the configuration files that also can be
written in JSON.

Also when library is used argument like “this is twice as long” is
hardly relevant because it only matters when using Vim over very slow
channel or when sending a huge chunks of binary data, otherwise there
is no difference what data is sent exactly as it does not reach the
user, and even most likely fits in the same number of packets.

And as I said, more space-efficient encodings are binary ones like
msgpack (or protocol buffers). More human-readable is YAML. Also
binary encodings are almost always parsed faster then text ones.

>
>
> --
> hundred-and-one symptoms of being an internet addict:
> 154. You fondle your mouse.
>
>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui