> > People who use Go are crazy, never do what they do! > > (just kidding, of course). > > I'm looking forward to the first commit to the Vim repo that is a .go > file ;-)
No, that would be Zimbu (it's like NeoGo). It has classes and exceptions, like any decent programming language. Oh, no, now I started a language war! > > > How about returning a triple: > > > > > > [8, 1, 1512]? > > > > Why? > > No particular reason, other than the fact I felt having a triple was > less brittle than encoding in a single number - you'll know better > than me whether we're likely to breach the various limits on > major/minor/patch in that scheme. > > But also that (see below) I consume semver strings and so will likely > continue to use them, rather than encoding. > > > But the very common use would be: > > > > if v:versionlong > 8011522 > > " Use the user friendly popup_notification() > > else > > " fall back to annoying :echomsg > > endif > > Yes, this is the kind of pattern I use. > > The v:versionlong value is something that I will "push" to govim at > startup, but this is just a minor detail to avoid roundtrips as I > mentioned. > > Given that govim itself predominantly consumes semver > (https://semver.org for reference) strings, either I convert those > semver strings (which are exactly the tags in the Vim repo) to numbers > following the same encoding above, or keep them as strings and use > existing libraries to work with them. > > The triple suggestion was really a nod to the very fair point that not > everyone wants semver (wants to quickly work with maj/min/patch) but > that for those who do it's easily built. In a compiled language it might be OK to deal with strings, split them and the like, but for Vim script we try to keep it efficient. I'll add v:versionlong then. -- Very funny, Scotty. Now beam down my clothes. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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/201906141027.x5EARkbL016030%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
