vim 9 dictionary keys cannot be dictionaries, lists, funcrefs or objects

18 views
Skip to first unread message

Mark Baily

unread,
Jan 11, 2023, 2:27:48 AM1/11/23
to vim_dev
Just wondering is there is a chance that a future version of vim will allow dictionary keys to be not just strings but dictionaries, lists, funcrefs or other objects?

Other languages do allow this, such as Emacs Lisp, Python, Javascript, Lua, C (like GLib).

Thanks
Mark

Bram Moolenaar

unread,
Jan 12, 2023, 3:05:42 PM1/12/23
to vim...@googlegroups.com, Mark Baily
Well, in the long list of features that could be added, I don't think
this would be near the top. Although it sounds nice, the practical
usage is rather limited. In most cases using string() on whatever you
want to use as a key will do the same thing, thus there doesn't seem to
be much reason to support this internally.

--
A radioactive cat has eighteen half-lives.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages