On Sun, Oct 1, 2023 at 7:20 AM shane qian <[email protected]> wrote:
> hi yegappan, > > 1. first of all, to me the `simple` meant `class` is class like `struct`, > I was not like the OOP in vim9script actually, but well that probably would > not be accepted by you all now. > Bram didn't intend the Vim9 classes to be simple structus. Please do read the Vim9 class documentation and the items in the todo.txt file before the recent changes (early august). > > 2. about the implementation, we've discussed to make class var be default > public and only one static keyword. that's another meant `simple`. > You do need to provide access control for object variables. Without that you cannot support user-defined types. A user-defined type should be able to support private variables and methods. > > 3. about the implementation still, now another ticket your proposal class > douder methods, that's really something like mixture, if you preferred > keyword then how about keyword `new C` for initiation? if you preferred > underscore then how about add length()/empty() as another private method? > etc. > The difference is that these methods are intended to be called internally by the Vim builtin functions and not directly by the user and other methods. The goal is to support operations like a built-in type (e.g. List, Dict, Blob, etc.) for objects. The underscores are used to make it explicit that these functions are not intended to be directly used. Regards, 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/CAAW7x7%3D5Stje%2BiAEifv0Gy%3D8dFdq55hkuRwyd_%2BDSnxuRyP3FQ%40mail.gmail.com.
