-
Notifications
You must be signed in to change notification settings - Fork 215
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
Replace every Symbol | string
& equiv. with the new interned
#1499
Conversation
see PR for more info
speaking of oversights
|
Another three: there’re many |
I tried doing this when |
1 similar comment
I tried doing this when |
@ParadoxV5 Thanks for this PR.
|
#1502 will fix the issue. |
Please excuse any disruptive comments. Certainly But in CRuby's API, https://github.com/ruby/ruby/blob/89a4fd67453b33b7c709c715f01cfeff8efb2f9d/string.c#L11870 Does the intention come across with "interned"? |
* `Object::name` * `Module::id` * `Net::HTTPHeader::key`
core/builtin.rbs
Outdated
%a{steep:deprecated} type Object::name = interned | ||
%a{steep:deprecated} type Module::id = interned | ||
%a{steep:deprecated} type Net::HTTPHeader::key = interned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this annotation in
Line 3 in fce99b9
"title": "Annotation associated to a declaration or a member: `%a{rbs:test}`, `%a{steep:deprecated}`, ...", |
Put the previous incarnations back where they once were
We are free to rename it until the RBS 3.3 release. 😃
My understanding is that intern is an one-to-one operation, which maps a string to an ID. It's not a frozen string. (Frozen string is also interned to reuse it though.) The type here is for something that will be interned. So I don't think it's a bad name. (Maybe We may be able to say it's too much connected to the implementation detail. Calling it in more abstract way, like |
I'm not a huge fan of either Just like how Kernel# Additionally, I agree that |
Thank you for your response. I now understand the reason for using It seems there might be a side effect to the issue related to the public nature of type aliases. Perhaps having private type aliases would be a good idea. |
Namespace it, such as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Will merge this PR, after reviewing other open PRs to minimize conflicts.
@soutaro I resolved the merge conflict |
So, with #1469, we have finally decided on what to call
Symbol | string
👌.This PR is a follow-up to #1488 to assimilate ALL
Symbol | string
s and equivalents to useinterned
. Regexp:/symbol \| string|string \| symbol/
interned
is?)String
with an uppercaseS
, i.e. no_ToStr
s accepted. But given that nearly if not all of them are C-implemented, I doubt they actually reject_ToStr
s and bet that they’re RBS oversights.Object::name
and (introduced with Allow Symbol | string to Module methods #1321)Module::id
[EDIT: andNet::HTTPHeader::key
]. They might be used in the wild, howëver, so backward-compatibility requires undeleting thosetype
defs.Integer | interned
s – how aboutint_interned
?c.c. @sampersand and @soutaro, author and reviewer of #1469 respectively
#good-first-issue