Nested Classes — thoughts and workarounds

Igbanam Ogbuluijah <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <CAOmRJrd9ga0nGchBL+KD=p0SWNVj8DtUH_sxuXXFtO-m=wVHMQ@mail.gmail.com>
Hello community,

I've been playing with some idea which has brought me to needing Nested
Classes in Vim. I am curious what you think about this? Would this be too
much for Vimscript? If not, what current workarounds would you suggest?

Context: I'm taking a stab at parsing protobuf definitions into Vim 9
classes. Nested messages in the protobuf demands
<https://arc.net/l/quote/qfcssecm> nested structs/classes.

Constraints:

   - (strong) All code-gen must be in vim9script; else how would the
   language gain popularity?
   - (weak) All definitions should be in one file

Current workarounds

   1. Regress into old VimL and use functions as classes. Then define
   internal "structures" as internal functions.
   2. Create a directory where each file is a top-level message class
   3. (current winner) Flatten the nesting, but only *export* top-level
   messages

What do you think? How can I approach this better?

Best,
Igbanam

-- 
-- 
You received this message from the "vim_use" 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_use" 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_use/CAOmRJrd9ga0nGchBL%2BKD%3Dp0SWNVj8DtUH_sxuXXFtO-m%3DwVHMQ%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.