> 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 ;-)
> > 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.
Thanks