00:18
<bakkot>
explicitly make them structural would let downstream specs rely on records being structural, which we don't want them to do
00:20
<bakkot>
they could have an algorithm which takes either a Foo Record or a Bar Record, possibly where those have the same fields, and then say "If arg is a Foo Record, then..."
01:25
<jmdyck>
tx
02:03
<ljharb>
they currently can rely on them being either, and we can't prevent one without enshrining the other
02:03
<bakkot>
we can't prevent anything
02:03
<bakkot>
they're just documents
02:03
<bakkot>
you can put whatever words you want in them
02:04
<ljharb>
you just said "would let", which is the same as "would prevent"
02:04
<ljharb>
if we can let, we can prevent :-)
02:04
<bakkot>
by "would let" I mean to say "would imply it's ok"
02:05
<bakkot>
nothing currently implies it is either OK or forbidden because it simply does not come up at all
02:05
<bakkot>
I don't want to start implying it is OK to do either
02:05
<bakkot>
and I don't want to write a rule in our spec which says "downstream specs should not do either of these" because that's a silly thing to put in our spec
02:06
<bakkot>
though it could reasonably be written down in the editorial conventions document Michael Ficarra keeps threatening to write
02:34
<jmdyck>
a document distinct from https://github.com/tc39/ecma262/wiki/Editorial-Conventions ?
03:34
<bakkot>
nope that one I just forgot he'd made it already
13:40
<Michael Ficarra>
the document can use some cleanup and further explanation, but it's actually fairly complete IMO
15:46
<shu>
gotta get it out of the wiki
15:46
<shu>
i also forgot the wiki even exists
16:51
<ljharb>
that's what assertions already are (that's not the only thing they are, ofc)
16:52
<bakkot>
they sometimes provide that function but if that was the only function they provided we would not have them
16:52
<bakkot>
we don't add assertions just to constrain other specs
17:59
<ljharb>
we add host hooks for that purpose
18:00
<ljharb>
i'm really surprised you don't think there's intrinsic value in setting boundaries for implementors of the spec
18:03
<bakkot>
I don't know how you got that from what I said
18:04
<bakkot>
we set boundaries for implementors of the spec all the time. that's basically all the spec is. but asserts are not how we do that. when we want to constrain the normative behavior available to a downstream specification we write down, normatively, what the constraints are. see, for example, the constraints in HostEnqueuePromiseJob: https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-hostenqueuepromisejob
18:05
<bakkot>
but "don't treat records as having either structural or nominal type" is not a boundary for implementors. it's an editorial convention we would prefer other spec authors who are re-using our specification machinery to follow. it has no implications for the world.
18:08
<bakkot>
we have no control over how people write other specifications. we can provide guidance. we can set things up in our spec so that it is easier or harder to re-use our spec machinery in particular ways. we can place restrictions on what normative behaviors are allowed in order to qualify as a valid implementation of our spec. but we can't tell people what words they're allowed to write down.
18:11
<bakkot>
(incidentally, the spec is very explicit that asserts are just for clarification, like any other comment. https://tc39.es/ecma262/multipage/notational-conventions.html#assert )
18:12
<ljharb>
gotcha, that makes sense
18:13
<ljharb>
to reiterate i don't really care if records are structural or nominal or neither/both. the thing that seems bizarre to me is that an empty record is technically a property descriptor
18:15
<bakkot>
my advice is to just not think about it
18:19
<Michael Ficarra>
FWIW I also don't like that and would probably prefer a refactoring of how we represent property descriptors
18:19
<Michael Ficarra>
but it's good enough that I'm not motivated to do it
18:41
<ljharb>
alright
19:34
<jmdyck>
Which seems more bizarre, that an empty record is a property descriptor, or that records are nominal? You can make the former go away if you imagine the latter.
19:53
<bakkot>
my advice to michael is also to just not think about it
19:56
<shu>
i love not thinking about things
23:35
<jmdyck>
Dang, I completely forgot about the call.
23:36
<jmdyck>
(Hm, I should have got a reminder...)