2 ms·
Edit: At first by TypedArray I thought you meant Array<...>; I forgot there was an actual TypedArray in JavaScript. The answer is roughly the same though: I'll
by brundolf 5y ago
Edit: At first by TypedArray I thought you meant Array<...>; I forgot there was an actual TypedArray in JavaScript.
The answer is roughly the same though: I'll be giving Bagel types to any built-in JS APIs that get exposed, and not all of them will be included (though the list could grow over time). I'm not sure about TypedArray specifically. Generally on this sort of thing I'm looking to Elm for guidance: it's about the same level of application-focused, batteries-included, curated language that I'm aiming for. I don't believe TypedArrays are available in Elm right now (though from a quick search it looks like there's been a little bit of interest here or there).
One thing that will be interesting (thinking out loud here) is exposing certain browser APIs where both the side-effect and the return value are important, since that can't really be expressed in Bagel semantics as-is. I don't think there are a huge number of those, but it will be fun to tackle those cases.