Ken Takata wrote:

> 2019/7/15 Mon 1:23:21 UTC+9 Bram Moolenaar wrote:
> > Patch 8.1.1692
> > Problem:    Using *{} for literal dict is not backwards compatible. 
> > (Yasuhiro
> >             Matsumoto)
> > Solution:   Use ~{} instead.
> > Files:          runtime/doc/eval.txt runtime/doc/popup.txt, src/eval.c,
> >             src/testdir/test_listdict.vim src/testdir/test_popupwin.vim,
> >             src/testdir/dumps/Test_popupwin_07.dump,
> >             src/testdir/dumps/Test_popupwin_mask_2.dump,
> >             src/testdir/dumps/Test_popupwin_mask_3.dump,
> >             src/testdir/dumps/Test_popupwin_mask_4.dump,
> >             src/testdir/dumps/Test_popupwin_mask_5.dump,
> >             src/testdir/dumps/Test_popupwin_scroll_2.dump,
> >             src/testdir/dumps/Test_popupwin_scroll_3.dump,
> >             src/testdir/dumps/Test_popupwin_scroll_4.dump
> 
> I personally prefer #{} than ~{}.
> '~' is used as a bitwise not operator in C.  So, when I see ~{}, I would doubt
> if it is a bitwise not of {}.  (Vim script doesn't have a ~ operator, though.)
> Dictionary is called as hash in some other languages, and # is also called
> hash.  So, #{} might be easy to remember.  And I don't think that #{} have a
> compatibility problem.

I like the connection with # being "hash", used for a hashtable.

Only downside is that it is used as a comment marker in other languages.
Well, I suppose we'll never use # for a comment in Vim (considering it
being used for the alternate file: ":e #").

-- 
BEDEVERE: Look!  It's the old man from scene 24 - what's he Doing here?
ARTHUR:   He is the keeper of the Bridge.  He asks each traveler five
          questions ...
GALAHAD:  Three questions.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201907161501.x6GF1pIU024284%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui