An alternative to implementing EvaluateSync through promise unwrapping could be to fully clone and specialize the Evaluate() function to synchronous evaluation, possibly with a sync arg for InnerModuleEvaluation.
It's entirely editorial, but thought it worth mentioning while we are thinking about the synchronous models in general if we want to more carefully specify it.
I believe Spidermonkey implements Evaluate() as conditionally returning a promise, which I like as an implementation. Another option might even be to hard-code that although it does complicate spec handling a little conditionally checking promises at call sites.
Alternatively feel free to close, just thought it's worth some discussion since we are introducing this method.
An alternative to implementing
EvaluateSync
through promise unwrapping could be to fully clone and specialize theEvaluate()
function to synchronous evaluation, possibly with async
arg forInnerModuleEvaluation
.It's entirely editorial, but thought it worth mentioning while we are thinking about the synchronous models in general if we want to more carefully specify it.
I believe Spidermonkey implements Evaluate() as conditionally returning a promise, which I like as an implementation. Another option might even be to hard-code that although it does complicate spec handling a little conditionally checking promises at call sites.
Alternatively feel free to close, just thought it's worth some discussion since we are introducing this method.