On Fri, 25 Aug 2023 at 15:21, Ernie Rael <err...@raelity.com> wrote: > On 23/08/24 9:10 PM, Doug Kearns wrote: > > On Fri, 25 Aug 2023 at 13:18, Yegappan Lakshmanan <yegapp...@gmail.com> > 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 "_" prefix? >> >> Function and method names always start with an uppercase letter. So >> if we use the >> "_" prefix for a private method name then it will diverge from that. So I >> have >> implemented this using the "private" keyword. >> >> Any opinions? >> > > Thanks very much for keeping the ball rolling on this. > > For others, there was some previous discussion[1] about it on the list > when Bram asked for opinions. My recollection is that both you and he were > in favour of the "_" prefix for call-site identification purposes? > > My personal preference would be for the modifier keyword with a symmetric, > even if possibly redundant, "public". > > Is it only redundant, or is there some semantic meaning or change? > Referring only to functions? > It's redundant if there's no 'readonly' access. It's common for languages to include an access modifier keyword for the default case so I'd prefer there was a modifier keyword for 'readonly' as well if that's the default.
However, I'd be inclined not to offer a default. I don't find declaration keywords to be a burden. Regards, Doug -- -- 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/CAJ1uvoBEcANUoSw7rP7_rPBajKy4i%3DBFyoh319FA%2BNJZ3yB5Ug%40mail.gmail.com.