Re: Support for Private class/object methods

2023-08-25 Fir de Conversatie Yegappan Lakshmanan
On Fri, Aug 25, 2023 at 3:50 PM Ernie Rael wrote: > > On 23/08/25 2:07 PM, bfrg wrote: > > If "public" is omitted, shouldn't class members and method be private by > default just like "def" functions and script variables are script-local by > default unless prefixed with "export"? > > In

Re: Support for Private class/object methods

2023-08-25 Fir de Conversatie Yegappan Lakshmanan
Hi, On Fri, Aug 25, 2023 at 2:07 PM bfrg wrote: > > If "public" is omitted, shouldn't class members and method be private by > default just like "def" functions > and script variables are script-local by default unless prefixed with > "export"? > Currently object/class methods are always

Re: [vim/vim] Change the LSP HTTP header Content-Type field (PR #12295)

2023-08-25 Fir de Conversatie Yegappan Lakshmanan
Hi, On Fri, Aug 25, 2023 at 4:26 PM Magnus Groß wrote: > @yegappan Is there any reason why the > Content-Type header is set in the first place? It causes problems with > some LSP servers such as haskell-language-server >

Re: Support for Private class/object methods

2023-08-25 Fir de Conversatie Ernie Rael
On 23/08/25 2:07 PM, bfrg wrote: If "public" is omitted, shouldn't class members and method be private by default just like "def" functions and script variables are script-local by default unless prefixed with "export"? In general, I would also like it to be symmetric. So, either introducing

Re: Support for Private class/object methods

2023-08-25 Fir de Conversatie bfrg
If "public" is omitted, shouldn't class members and method be private by default just like "def" functions and script variables are script-local by default unless prefixed with "export"? In general, I would also like it to be symmetric. So, either introducing "public" and "private" together,

Re: Vim9: Default object member access

2023-08-25 Fir de Conversatie shane qian
> 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

Re: Vim9: Default object member access

2023-08-25 Fir de Conversatie Yegappan Lakshmanan
On Fri, Aug 25, 2023 at 9:32 AM shane qian 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

Re: Vim9: Default object member access

2023-08-25 Fir de Conversatie Ernie Rael
On 23/08/25 6:50 AM, Yegappan Lakshmanan wrote: 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

Re: Vim9: Default object member access

2023-08-25 Fir de Conversatie shane qian
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

Re: Vim9: Default object member access

2023-08-25 Fir de Conversatie Yegappan Lakshmanan
Hi, On Fri, Aug 25, 2023 at 9:01 AM shane qian 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

Re: Vim9: Default object member access

2023-08-25 Fir de Conversatie shane qian
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. -- shane.xb.qian

Re: Support for Private class/object methods

2023-08-25 Fir de Conversatie Ernie Rael
On 23/08/24 9:22 PM, shane.qian wrote: On 23/08/24 08:18PM, Yegappan Lakshmanan wrote: Hi all, The following item is in the todo.txt file for implementing private methods in a class: - Private methods? either: private def Func() or: def _Func() Perhaps use

Vim9: Default object member access

2023-08-25 Fir de Conversatie Yegappan Lakshmanan
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

Re: Support for Private class/object methods

2023-08-25 Fir de Conversatie shane.qian
On 23/08/24 08:18PM, Yegappan Lakshmanan wrote: > Hi all, > > The following item is in the todo.txt file for implementing private > methods in a class: > > - Private methods? > either: private def Func() > or: def _Func() > Perhaps use "private" keyword instead of "_"