Re: grammar for 'constant' ?
John M. Dlugosz wrote: The synopses are contradictary over the way 'constant' works. First it says that it is a declarator like 'my'. That's what STD.pm says: token scope_declarator:my { sym scoped {*} } token scope_declarator:our { sym scoped {*} } token scope_declarator:state{ sym scoped {*} } token scope_declarator:constant { sym scoped {*} } token scope_declarator:has { sym scoped {*} } Then in S12 it shows my constant ... and our constant ... that is, independant from the my or our declarator. I grep'ped STD.pm tentatively for other occurrences of 'constant', and couldn't find where that should be implemented. Assuming the second way is newer/better, what is the grammar for this? Is it a declarator if used on its own, or a different category? Oh, and should it still say that if you leave off the optional 'my' or 'our' that it defaults to 'my', or should it be 'our' like everything else? --John -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature
Re: grammar for 'constant' ?
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: Then in S12 it shows my constant ... and our constant ... that is, independant from the my or our declarator. I grep'ped STD.pm tentatively for other occurrences of 'constant', and couldn't find where that should be implemented. Thanks. I checked S12 again and could not find that example. Maybe my mistake from when I took notes the first time. So, let's talk about the semantics of constant. It's natural to want to export them from classes or modules. So, the description of them being just like my is incomplete. I propose allowing that to be true as far as it goes, but describing the meaning of adding is export to the declaration as well. --John
grammar for 'constant' ?
The synopses are contradictary over the way 'constant' works. First it says that it is a declarator like 'my'. Then in S12 it shows my constant ... and our constant ... that is, independant from the my or our declarator. Assuming the second way is newer/better, what is the grammar for this? Is it a declarator if used on its own, or a different category? Oh, and should it still say that if you leave off the optional 'my' or 'our' that it defaults to 'my', or should it be 'our' like everything else? --John