Markus Lanthaler: I asked Robin for his preference - he said futures, but we are not going to do that. [scribe assist by Manu Sporny]
Markus Lanthaler: The next thing would be to just use method overloading and ship it even though that means we're shipping it ... (MISSED) [scribe assist by Manu Sporny]
Markus Lanthaler: He said that we should probably just keep what we had. [scribe assist by Manu Sporny]
Markus Lanthaler: If we do method overloading, we'd be depending on a bug in WebIDL. [scribe assist by Manu Sporny]
Manu Sporny: PROPOSAL 1: If the result of compaction is an array at the top level, always wrap it in @graph (default graph). This means that the result of compaction will always be an object.
Manu Sporny: PROPOSAL 2: If the result of compaction is an array at the top level, only wrap it in @graph (default graph) if a context has been passed. This means that if compaction was called without passing a context (or a null context), the result might be an array or an object, depending on the number of nodes at the top level.
Dave Longley: the question is: if you compact an array, will the result always be an object or just if a context has been passed
Gregg Kellogg: I think avoiding @graph when possible might be a good thing
Markus Lanthaler: You don't always get an object back. [scribe assist by Manu Sporny]
Markus Lanthaler: Do we really allow passing 'null' for the context parameter in the compaction call? [scribe assist by Manu Sporny]
Markus Lanthaler: We use the same thing in flatten [scribe assist by Manu Sporny]
Markus Lanthaler: The flattening result is in expanded form, would it be simpler to say that you can't pass 'null' for a context. [scribe assist by Manu Sporny]
Dave Longley: I wonder if people would prefer to pass an empty context. [scribe assist by Manu Sporny]
Markus Lanthaler: the other problem is that if we pass null for context to flatten the result will be in expanded form
Dave Longley: I think empty contexts are already a corner case.. but if they use it with arrays they might wanna just get back arrays
Markus Lanthaler: Typically, JSON developers want an object at the top level and not an array. I know @graph isn't the simplest feature we have, but at least it's consistent. [scribe assist by Manu Sporny]
Markus Lanthaler: That's regardless of what kind of context you pass. [scribe assist by Manu Sporny]
Manu Sporny: I prefer PROPOSAL 1 [scribe assist by Manu Sporny]
Markus Lanthaler: me too [scribe assist by Manu Sporny]
Dave Longley: I don't feel too strongly about it, it's a corner case, it would simplify the code. [scribe assist by Manu Sporny]
Gregg Kellogg: I don't feel strongly about it
Gregg Kellogg: I don't feel strongly about it. [scribe assist by Manu Sporny]
Dave Longley: I'm just a bit concerned if this turns out to become a popular feature (using empty contexts with arrays)
PROPOSAL: If the result of compaction is an array at the top level, always wrap it in @graph (default graph). This means that the result of compaction will always be an object.
Manu Sporny: +0.8
Gregg Kellogg: +0
Markus Lanthaler: +1
Dave Longley: +0.3
Paul Kuykendall: +0
RESOLUTION: If the result of compaction is an array at the top level, always wrap it in @graph (default graph). This means that the result of compaction will always be an object.
Markus Lanthaler: We need to get a resolution down for null being passed as a context to .compact() [scribe assist by Manu Sporny]
PROPOSAL: When a context is passed into the .compact() function call, it MUST NOT be the 'null' value. If a null value is detected, an error must be thrown.
Markus Lanthaler: +1
Manu Sporny: +1
Dave Longley: +1
Gregg Kellogg: +1
Paul Kuykendall: +1
David I. Lehn: +0
RESOLUTION: When a context is passed into the .compact() function call, it MUST NOT be the 'null' value. If a null value is detected, an error must be thrown.