My opinion is that it's ok to drop double-quote comments in vim9 script. I 
think it's good to only have 1 way to do things right, so having both 
double-quote and hash comments feels off.

Vim is a somewhat of an outlier in using double-quote for comments, so it 
would seem and feel natural to me to keep hash comments on vim9script and 
respectfully wave goodbye to double-quote comments. As you say, this is 
another way that can signal that the syntax and semantics of the code 
differ between legacy vimscript and vim9script.

I don't feel it's any more jarring than being able to call an expression 
without `call`, or requiring typing. Legacy vimscript and vim9script are 
essentially 2 completely different dialects, which means picking one way to 
do comments is probably a good idea.

On Wednesday, July 15, 2020 at 1:25:48 PM UTC+1, Bram Moolenaar wrote:
>
>
> I'm trying to make the Vim9 script syntax consistent and easy to use. 
> But I'm now running into something that would be a drastic change. 
>
> I already added support for comments starting with #.  These are nice, 
> we know them from shell scripts, Python and a few other syntaxes. 
>
> Double quoted comments can currently still be used, but not everywhere. 
> E.g. when an expression might continue in the next line: 
>                 function("arg one", 
>                         "arg two") 
>
> This also shows the inconsistency: 
>         myList->add(123)                " works 
>         g:myList->add(123)                " works 
>         [1, 2, 3]->Process()                " works 
>         #{a: 1, b: 2}->Process()        " works 
>         {'a': 1, 'b': 2}->Process()        " works 
>         "foobar"->Process()                " does NOT work 
>         ("foobar")->Process()                " works 
>         'foobar'->Process()                " does NOT work 
>         ('foobar')->Process()                " works 
>
> I just made the last-but-one work, since we added the rule that a range 
> must start with a colon, and using a mark in a range would thus be :'t. 
>
> To make this work with a double quoted string, we don't have much choice 
> but to disallow double quoted comments.  Since there really is no way to 
> tell the difference, both a string and a comment may contain anything. 
>
> Vim has always supported double quoted comments, disallowing them would 
> be a big divergence.  But as the above shows, it does make it consistent 
> and easy to use.  It's just not at all backwards compatible. 
>
> Opinions? 
>
> -- 
> How To Keep A Healthy Level Of Insanity: 
> 18. When leaving the zoo, start running towards the parking lot, 
>     yelling "run for your lives, they're loose!!" 
>
>  /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a44185d8-def9-4242-b59a-c33c67f5ffe4o%40googlegroups.com.

Raspunde prin e-mail lui