Hi,

On Tue, Feb 1, 2022 at 8:05 AM Bram Moolenaar <vim-dev-git...@256bit.org>
wrote:

>
> > v8.2.4264 revoked the '#' style function name in vim9, but:
> > 1, that made some complex to call such vim9 func in legacy vim script
> > e.g vimrc.
>
> I don't see how. You can still call the autoload function using the #
> form.
>

The recent changes to disallow the use of '#' in a function name and the
changes to the import mechanism resulted in quite a bit of changes to the
LSP Vim9 plugin.

You can see the impact in the following commits:

https://github.com/yegappan/lsp/commit/aeede042a93441f038f6b36448aaf383969bc86b
https://github.com/yegappan/lsp/commit/d7105d210391ad8fe3733d81f048df7a970b2488

In particular look at the changes to the plugin/lsp.vim. As all the users
may not
have the latest Vim, the plugin needs to support an older version of Vim
and the latest
version. This is difficult.

Regards,
Yegappan


>
> > 2, that exported func name had to be 'Uppercase' first letter?
> > ```vim
> > - func auto9#getsome()
> > + export func Getsome()
> > ```
>
> Yes, that is intentional. In legacy script there was an inconsistency,
> allowing lower case function names. It was OK there since you always
> had to prefix "scriptname#". But in Vim9 script you can call the
> function without the prefix inside the script, therefore the leading
> capital is required.
>
> > 3, in some languages, if that first letter of function name is
> > Uppercase, that means 'public' already, as my understanding, if it do
> > req 'Uppercase' then maybe no req 'export' keyword?!
>
> No, we do not do it that way.
>
>
>

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7kreO2UqUiM9pxvq9VTNhKnjg9JL7A_H0kNs%3DbaqWkQ5Q%40mail.gmail.com.

Raspunde prin e-mail lui