-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tease apart names and identifiers #250
Comments
It's interesting to think what happens to dict keys. The sane default seems to be to allow only identifiers there, not whole keys. But then we lose the ability to have a key such as |
This change charges some extra onto the already debt-ridden 'property' method in Runtime.pm6. It's overdue for some cleanup; maybe even before one that affects the entire object system. In general, this change introduces technical debt here and there, which can either be cleaned up gradually, or as part of a bigger object system rework. Until then, we already have the dot separator, and we've cleaned up `::` for other things (such as a custom operator). There are a couple of places in the language where previously we expected "one identifier" denoting a type, but now it's a chain of dot-separated identifiers instead; what #250 calls a "name": - After `new` - After `quasi @` - Before the `@` in unquotes The "neat" shortcut in self-host/runtime.007 where we used the Q hierarchy type "identifiers" as object/dictionary keys had to go. But that was a price we had to pay at some point anyway. Closes #250. Closes #298.
This change charges some extra onto the already debt-ridden 'property' method in Runtime.pm6. It's overdue for some cleanup; maybe even before one that affects the entire object system. In general, this change introduces technical debt here and there, which can either be cleaned up gradually, or as part of a bigger object system rework. Until then, we already have the dot separator, and we've cleaned up `::` for other things (such as a custom operator). There are a couple of places in the language where previously we expected "one identifier" denoting a type, but now it's a chain of dot-separated identifiers instead; what #250 calls a "name": - After `new` - After `quasi @` - Before the `@` in unquotes The "neat" shortcut in self-host/runtime.007 where we used the Q hierarchy type "identifiers" as object/dictionary keys had to go. But that was a price we had to pay at some point anyway. Closes #250. Closes #298.
This change charges some extra onto the already debt-ridden 'property' method in Runtime.pm6. It's overdue for some cleanup; maybe even before one that affects the entire object system. In general, this change introduces technical debt here and there, which can either be cleaned up gradually, or as part of a bigger object system rework. Until then, we already have the dot separator, and we've cleaned up `::` for other things (such as a custom operator). There are a couple of places in the language where previously we expected "one identifier" denoting a type, but now it's a chain of dot-separated identifiers instead; what #250 calls a "name": - After `new` - After `quasi @` - Before the `@` in unquotes The "neat" shortcut in self-host/runtime.007 where we used the Q hierarchy type "identifiers" as object/dictionary keys had to go. But that was a price we had to pay at some point anyway. Closes #250. Closes #298.
I think the thing I just realized in #413 (comment) means that we should have a separate |
And yes, I'm quickly coming to terms with the fact that the dot ( We should have a name for all of these things that look like operators but aren't. "Quasi-operators"? |
Let's not use "quasi" ;). Fauxperators? Pseudoperators? |
Good point. Didn't think of that. "Notperators"? "Snoberators"? "Floperators"? "Unperators"? The problem with all of these is that they are a little bit too cute. I would prefer a term that's very boring, but that immediately gives the right impression. Like something that in itself means "this isn't an operator; yes, I know it looks like one". "Surrogate operators"? |
To be excruciatingly clear: when we parse Two things need to hold for it to be the latter: |
Thinking about this, I think that the |
As a data point, IntelliJ calls this entity a reference expression. It also calls everything before the last dot (if any) a qualifier. |
Here's another thing I would like to get in place pre-1.0, because a deprecation cycle would be less-than-fun afterwards: currently,
Q::Statement
(note the double colons) is a valid identifier in 007. This goes against the established definition of "identifier" in basically all languages.In Perl 6,
Q::Statement
is called a name in the grammar. I just checked. We might borrow as much prior art from the Perl 6 grammar as we can here.The
<morename>
token does a number of other things, like indirect lookup, that doesn't interest us right now.The text was updated successfully, but these errors were encountered: