Conversation
|
🍰 |
|
What are the advantages? Right now a user can use any undefined value she has lying around. What would a true sentinel gain the user? What would it gain our codebase? |
There was a problem hiding this comment.
These fixes look worth doing regardless. What were we smoking?
|
i think a unique placeholder object is clearer than using |
Clarity. Right now our message to users is along these lines:
This is what I would like to say instead:
I find the alternative acceptable too, though it's not as succinct:
Let's pick |
|
As ususal, you make a good argument. I still can't say I like it. I would rather go with My objection to the sentinel is that But I don't think I can have my 🍰 and eat it too. So here's a very reluctant 👍 |
I'm fine with closing this pull request and opening a new one to remove |
I think the explanation could be significantly simpler:
|
b4fc92c to
4d73d12
Compare
True, but I don't see any harm in "labelling" the object to aid debugging. |
I suppose I agree. But I think or One other thought. I'm assuming that we'll stick with our caveat emptor, or with Peter Parker's "with great power comes great cliches" (sorry, some translation glitch), for the possibility of someone reassigning the value of |
make |
I'm just not sure how we would do that. |
4d73d12 to
9c33055
Compare
I agree. I've updated the label to As for the possibility of a user assigning another value to
|
assign sentinel object to R.__
Oh no, I would not consider that. I was merely thinking along the lines of which would then have to be wrapped in some not-ES3 check... not worth it.
Yes, but as that is likely to be the only reference to the sentinel, it will now be fatal, whereas when we used
Right, and unless we grow to have jQuery-sized concerns, I don't think we ever really need to worry about how one user deals with another's abuse of our library inside the same scope. If we ever get to the point of having such worries, this will probably be among the more minor ones. |
I've never been comfortable with the value of
R.__beingundefined. Why "define" it at all, in this case? I like defining a true sentinel and requiring users to reference it directly or define a convenient 👽: