Perl-Apollo / Corinna

Corinna - Bring Modern OO to the Core of Perl
Artistic License 2.0
157 stars 19 forks source link

Grammar Feedback #2

Closed Ovid closed 3 years ago

Ovid commented 4 years ago

Use this issue to leave feedback on the Cor grammar.

Abigail commented 4 years ago
VERSION     ::= 'v' DIGIT '.' DIGIT {DIGIT}

So, you can have 10 versions (if you start counting at 0), and then it's game over? That's just one more than cats get, and three less than time lords get. ;-) I guess it's just a typo, and you really want 'v' DIGIT {DIGIT} '.' DIGIT {DIGIT}.

But why exactly one period? Some people like dotless version numbers (like DNS uses), others prefer two (which Perl itself uses) or more. And since this is Perl, you probably want to specify whether version 4.2 lies between versions 4.1 and 4.3, or between 4.199 and 4.201.

cxw42 commented 4 years ago

(Edited) Good point. I would personally rather inherit the existing version-number flexibility (and weirdness) of Perl 5 than have to remember yet another versioning scheme :) . Therefore:

(refs: the grammar in version::regex. Also, CPAN::Meta::Spec, version::Internals)

Ovid commented 4 years ago

@Abigail For now, I've changed it to a three-part v string. Thanks for your comments!

@cxw42 The only reason to leave version numbers the way they are now is because of backwards-compatibility with a horribly broken system. However, if we do that, we can't reliably compare version numbers and that destroys many of the benefits we're trying to get by having a "better" OO system.

cxw42 commented 4 years ago

@Ovid vX.Y.Z is fine with me :) . For clarity, same v-string semantics as version 0.77+? I.e., same comparison rules, but no semver restrictions on what the parts of the v-strings mean?

I believe we do not need to support any kind of pre-release indicator (vX.Y_Z). Yes? It would be worth documenting that in the spec either way so it's clear what we are and are not carrying forward from the past.

duncand commented 3 years ago

If we want Corinna to do better we'll also want to include an authority attribute and not just a version attribute, if not up front then leaving that open for a possible later addition.

Ovid commented 3 years ago

This is resolved for the MVP. Further issues should be new tickets.