-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
spec/set-prototype-is-disjoint.html
Outdated
1. Else, let _otherSet_ be _iterable_. | ||
1. Let _hasCheck_ be ? Get(_otherSet_, "has"). | ||
1. If IsCallable(_hasCheck_) is *false*, throw a *TypeError* exception. | ||
1. For each _e_ that is an element of _entries_, do |
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.
Nit: e
→ entry
(no reason to use single-letter variable names here)
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.
Same goes for the other methods
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.
Leaving as such to be consistent with the spec
spec/set-prototype-is-subset.html
Outdated
1. Let _hasCheck_ be ? Get(_otherSet_, "has"). | ||
1. If IsCallable(_hasCheck_) is *false*, throw a *TypeError* exception. | ||
1. For each _e_ that is an element of _entries_, do | ||
1. Let _has_ be ? Call(_hasCheck_, _otherSet_, « e ») |
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.
Nit: missing .
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.
Done
spec/set-prototype-is-disjoint.html
Outdated
@@ -0,0 +1,21 @@ | |||
<p>When the `isDisjoint` method is called, the following steps are taken:</p> |
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.
Missing “with argument …” — see #27
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.
Same for the other methods
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.
Done
@@ -119,7 +119,11 @@ Search.prototype.search = function (searchString) { | |||
|
|||
for (var i = 0; i < this.biblio.length; i++) { | |||
var entry = this.biblio[i]; | |||
|
|||
if (!entry.key) { |
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.
Is there a bug for this on https://github.com/bterlson/ecmarkup?
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.
No. Why is this a bug? I'm not sure how ecmarkup generates this output, feel free to file an issue if you think this is incorrect.
spec/index.html
Outdated
@@ -39,3 +39,18 @@ <h1>Set.prototype.difference(_iterable_)</h1> | |||
<h1>Set.prototype.symmetricDifference(_iterable_)</h1> | |||
<emu-import href="./set-prototype-symmetric-difference.html"></emu-import> | |||
</emu-clause> | |||
|
|||
<emu-clause id="Set.prototype.isSubset"> | |||
<h1>Set.prototype.isSubset(_iterable_)</h1> |
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.
The name isSubset
seems ambiguous. In a.isSubset(b)
are you testing whether: a
is a subset of b
or b
is a subset of a
? It could be construed either way. I would recommend a name that better indicates the relationship such as:
a.isSubsetOf(b)
- Indicatesa
is a subset ofb
a.hasSubset(b)
- Indicatesb
is a subset ofa
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.
Done
spec/index.html
Outdated
</emu-clause> | ||
|
||
<emu-clause id="Set.prototype.isSuperset"> | ||
<h1>Set.prototype.isSuperset(_iterable_)</h1> |
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.
As with isSubset
, isSuperset
seems ambiguous. I would recommend a name that better indicates the relationship such as:
a.isSupersetOf(b)
- Indicatesa
is a superset ofb
a.hasSuperset(b)
- Indicatesb
is a superset ofa
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.
I agree that isSupersetOf
and isSubsetOf
are better names.
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.
Updated.
spec/set-prototype-is-subset.html
Outdated
1. Let _entries_ be the List that is _set_.[[SetData]]. | ||
1. If Type(_iterable_) is not Object, throw a *TypeError* exception. | ||
1. If _iterable_ does not have [[SetData]] internal slot, | ||
1. Let _otherSet_ be Construct(%Set%, _iterable_). |
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.
Shouldn't we use SpeciesConstructor here?
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.
I don't see any benefits of using a SpeciesConstructor here.
spec/set-prototype-is-superset.html
Outdated
|
||
</emu-alg> | ||
|
||
<p>The `length` property of the `isSuperSet` method is *1*.</p> |
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.
Inconsistent casing.
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.
Fixed
spec/index.html
Outdated
</emu-clause> | ||
|
||
<emu-clause id="Set.prototype.isSuperset"> | ||
<h1>Set.prototype.isSuperset(_iterable_)</h1> |
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.
I agree that isSupersetOf
and isSubsetOf
are better names.
spec/set-prototype-is-disjoint.html
Outdated
1. Let _entries_ be the List that is _set_.[[SetData]]. | ||
1. If Type(_iterable_) is not Object, throw a *TypeError* exception. | ||
1. If _iterable_ does not have [[SetData]] internal slot, | ||
1. Let _otherSet_ be ? Construct(%Set%, _iterable_). |
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.
Shouldn't we use SpeciesConstructor
?
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.
Don't see any benefit here either
spec/set-prototype-is-subset.html
Outdated
1. Else, let _otherSet_ be _iterable_. | ||
1. Let _hasCheck_ be ? Get(_otherSet_, "has"). | ||
1. If IsCallable(_hasCheck_) is *false*, throw a *TypeError* exception. | ||
1. For each _e_ that is an element of _entries_, do |
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.
It needs to check for empty
entries.
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.
Why?
f469885
to
be47b44
Compare
<emu-import href="./set-prototype-is-superset-of.html"></emu-import> | ||
</emu-clause> | ||
|
||
<emu-clause id="Set.prototype.isDisjointWith"> |
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.
Small note: I believe "is disjoint from" is significantly more common than "is disjoint with". Googling each phrase gives almost an order of magnitude more results for "is disjoint from", and the first result for "is disjoint with" is someone asking if it's correct (whereas the first result for "is disjoint from" is a math article).
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.
Can you raise new issue about this?
Fixes #16
cc @rbuckton @mathiasbynens