On Friday 2018-05-04 10:21 +1200, Karl Tomlinson wrote: > Is having web specifications try to describe object lifetimes > helpful, or is it just over-prescribing? > > Should specifications instead just focus on observable behavior, > and leave it to implementations to optimize and to reclaim > resources that are no longer required? > > Are you aware of any guidance I could reference, if advocating > this? (The WG has been very keen to make this normative.)
Without digging too far into this specific case, I can attempt to offer some answers to the general questions: There is design guidance here, in a document published by the W3C Technical Architecture Group: https://w3ctag.github.io/design-principles/#js-gc that garbage collection should not be observable. Ensuring that GC isn't observable sometimes does require normative descriptions of minimum object lifetimes, such as in https://github.com/w3c/permissions/issues/170 , but generally normative descriptions of maximum object lifetimes shouldn't be needed. That said, in general it's useful for specifications to give informative explanations of the design decisions that led to the current specification (since that helps future maintenance of the specification, and also likely helps implementors contribute to that maintenance). It's also generally useful for specifications to give informative implementation advice when there are things worth pointing out that an implementor might not realize immediately. I'd like to specifications have both sorts of informative sections substantially more often than they do today. > Perhaps it would be best to just have an informative section > explaining design decisions made for the sake of making resource > reclamation possible, such as lack of graph introspection. Perhaps > it would also be helpful to have some informative reminders to > implementations re what GC must not affect. These both sound useful, as I mentioned above. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: PGP signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform