16:49
<bakkot>
hey nice, SRI support for ES modules finally https://github.com/whatwg/html/pull/10269
19:00
<bakkot>
ljharb: I just realized that I had previously suggested a Function.prototype.try, and that kind of conflicts with Promise.try in that Promise inherits from Function but Promise.try is a different thing than Function.prototype.try would be
19:00
<bakkot>
I feel like if we are going to use that name for something it would be better used on Function.prototype.try
19:01
<bakkot>
Function.prototype.try being https://matrixlogs.bakkot.com/TC39_Delegates/2023-11-29#L10
19:01
<bakkot>
maybe we can just live with the conflict? but it's a bit awkward
19:02
<bakkot>
I guess because Promise can't be called without new it is unlikely to be an issue in practice, but still
19:19
<Justin Ridgewell>
I don't think that'd be a conflict
19:20
<Justin Ridgewell>
One returns a sync monad (can we get a Result type?), the other returns an async monad
19:20
<Justin Ridgewell>
Someone actually just asked for Result in the internal Google chat yesterday
19:23
<nicolo-ribaudo>
I don't think that'd be a conflict
Promise is an instance if function, so it would shadow .try with an incompatible implementation
19:23
<Justin Ridgewell>
I understand, but disagree that it’s incompatible
19:24
<Justin Ridgewell>
It’s returning the type appropriate for the constructor
19:26
<Justin Ridgewell>
And I'm now realizing that Promise.try receive the fn to call as its first argument, and Function.try would not.
19:26
<Justin Ridgewell>
Never mind, ignore my comments.
23:07
<Michael Ficarra>
https://github.com/tc39/ecma262/pull/3313
23:26
<rbuckton>
Someone actually just asked for Result in the internal Google chat yesterday
Something along the lines of Option that I've been talking about in relation to extractors and pattern matching and ADT enums?
23:28
<Justin Ridgewell>
Similar but not quite, since None can’t carry data that Err can
23:29
<rbuckton>
Fair, though Result still seems like something in the same ballpark