> using a leading underscore makes it
apparent that the referred method or member variable is private.

I think we need consistent, how about `export` def before you check that (def) 
if had `export` do you know if it was export?
not even mentioning all those var before you check its type do you know all 
their type?
I think we do not need special magic leading underscore here.

--
shane.xb.qian
________________________________
From: [email protected] <[email protected]> on behalf of Yegappan 
Lakshmanan <[email protected]>
Sent: Saturday, August 26, 2023 12:48:04 AM
To: [email protected] <[email protected]>
Subject: Re: Vim9: Default object member access

On Fri, Aug 25, 2023 at 9:32 AM shane qian <[email protected]> wrote:
>
> best choice was leading lowercase, but seems it's not a choice in vim script.
>
> so I prefer and vote both to use leading `private` for var and method.
> and in that github ticket I think bram also said he wish it's `consistent`.
> vs leading underscore was a bit magic, IMO it even may lost in kw search 
> since it needed to ignore leading _ to confirm.
>

As discussed in the other email thread, using a leading underscore makes it
apparent that the referred method or member variable is private.
Otherwise one needs to look at the method/variable definition to see whether it
is private or not. I prefer the leading underscore for private methods and
member variables.

Regards,
Yegappan

>
> --
> shane.xb.qian
> ________________________________
> From: [email protected] <[email protected]> on behalf of 
> Yegappan Lakshmanan <[email protected]>
> Sent: Saturday, August 26, 2023 12:12:35 AM
> To: [email protected] <[email protected]>
> Subject: Re: Vim9: Default object member access
>
> Hi,
>
> On Fri, Aug 25, 2023 at 9:01 AM shane qian <[email protected]> wrote:
> >
> > the default perhaps was `protect`, since looks default it cannot be 
> > accessed out of pkg.
> >
> > I think another bram's comment in another github issue ticket (I cannot 
> > open that google link) had
> > showed his preference which is using `private` keyword vs not magic leading 
> > underscore.
> >
>
> Currently the name of private object member variables are prefixed
> with an underscore and
> the keyword "private" is not used.  If we use the "private" keyword
> for private object methods,
> then it will be different from object member variables.
>
> To keep them symmetric, either we should support the "private" keyword
> for both the private
> member variables and private methods or support the underscore for both of 
> them.
>
> Regards,
> Yegappan
>
> > --
> > shane.xb.qian
> >
> > ________________________________
> > From: [email protected] <[email protected]> on behalf of 
> > Yegappan Lakshmanan <[email protected]>
> > Sent: Friday, August 25, 2023 9:50:28 PM
> > To: vim_dev <[email protected]>
> > Subject: Vim9: Default object member access
> >
> > Hi all,
> >
> > From the email thread
> > https://groups.google.com/g/vim_dev/c/yYpFNUHdRho/m/xjgrKqMoBQAJ?pli=1
> > and the following items in the todo.txt file:
> >
> >   - Change access: public by default, private by prefixing "_".
> >         Check for error: can't have the same name twice (ignoring "_" 
> > prefix).
> >
> > This is not yet implemented.  We cannot change this after releasing Vim 9.1.
> > Should we make this change now?
> >
> > Thanks,
> > Yegappan
> >

--
--
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/CAAW7x7kp9y8nFqRKQ-fGK-AQxScTudndaMpm%3Df5QC3nsi-xQxw%40mail.gmail.com.

-- 
-- 
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/OS3P286MB091381157BD0F6766748C1A6EBE3A%40OS3P286MB0913.JPNP286.PROD.OUTLOOK.COM.

Raspunde prin e-mail lui