Closed scheibo closed 5 years ago
+0
I recall discussing this exact rename (toId
-> toID
) with @Zarel long ago, but inertia won back then, and nothing remarkable in that regard has changed since then.
ID
being a global is an interesting idea, but I don't see the benefit. Would it be a subclass of String
? I'd definitely not like ID.get()
, but I'd suggest ID.from()
if we went that way.
EDIT: Remember that Tools.getId
would need to be changed to Tools.getID
as well.
ID.from
is also ew to me, for the record.
I'm indifferent to this.
+0
I'm indifferent to this.
Did not expect this to be super controversial, but its one of the most fundamental methods so I wanted to make sure I wasn't pissing anyone off.
@Zarel - I'd like to do this to the client as well so that the codebases match, but since I don't have push access there (opening a PR will likely quickly become out of date) and since you're actively working on the Preact refactor and it would likely give you lots of conflicts, maybe you want to commit this instead? I just ran the following:
git grep -l toId | xargs sed -e 's/toId/toID/g' -i ''
I just added you as a collaborator on Client.
Originally posted by @Zarel in https://github.com/Zarel/Pokemon-Showdown/pull/5475#issuecomment-489378855
toId()
->ID()
doesn't require any weird shenanigans in the same way theRooms()
vsRooms.get()
pattern does (its just a function rename). I personally don't care abouttoID
vs.ID
, I just want the function name to better reflect the type. However, consistency between the client and the server is also very desirable to me, and given the following:Originally posted by @Zarel in https://github.com/Zarel/Pokemon-Showdown/pull/5475#issuecomment-489426041
I think
toID
is the best option given @Zarel's concerns.I will leave this issue open for a week before performing the rename to leave sufficient opportunity for objections. @Zarel @Slayer95 @whalemer @Kaiepi @TheImmortal @xfix who had an opinion on https://github.com/Zarel/Pokemon-Showdown/pull/5429#issuecomment-481463245 to weigh in before I make the change (though if anyone else reads this and wants to weigh in, the more the merrier).