Re:Twenty five thousand dollars of funny money
by chpatrick on Saturday December 03, 2022 @12:03PM
(#33844955)
You can kind of do it:
Or if you don't want to make an extra wrapper around every object:
Presumably V8 is smart enough to inline the wrapper functions.
[ Parent
| on HN ]
Re:Twenty five thousand dollars of funny money
by Waterluvian on Saturday December 03, 2022 @12:34PM
(#33845277)
Oh cool. So you basically lie about the runtime structure of the type, which works out fine during type checking at compilation.
Re:Twenty five thousand dollars of funny money
by Waterluvian on Saturday December 03, 2022 @12:05PM
(#33844979)
Discriminators are super power powerful. Love them. But they can be just so heavy for things.