Yegappan wrote:
> In legacy Vim scripts, a script local function prefixed with "s:" can
> start with a lower-case letter. A Vim9 function explicitly prefixed
> using "s:"can also start with a lower-case letter.
>
> But a vim9 function name that doesn't have an explicit "s:" prefix
> cannot start with a lower-case letter. A Vim9 function has a script-local
> scope by default. So should it be allowed to start with a lower-case
> letter?
I suppose we could allow it. The idea is that we don't want a user
defined function shadow a builtin function unexpectedly, also when the
builtin function is added a year later. That is a problem for global
functions, not su much for script-local functions. It still shadows the
builtin function, but it's local to a script, so you know what function
you want to call.
--
Bad fashion can discourage normal people from interacting with the engineer
and talking about the cute things their children do.
(Scott Adams - The Dilbert principle)
/// 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/202012211859.0BLIxaHi2322710%40masaka.moolenaar.net.