dcodeIO
dcodeIO
+1 from me as well, sounds very good! If a lossless alternative cannot find consensus, at AssemblyScript we would very likely fall back to canonical UTF-16 while documenting what can...
I appreciate the excursion into complex string representations and non-standard optimizations that some VMs do. I think it's a little one-sided / too early to only look at the complex...
Potential solution: Keep arrays as is, and introduce a `vector` type taking size-hints upon creation and resize, trapping when OOB.
> Luckily, most of those would choose to grow the backing buffer by 1.5x to 2x usually, not on every single new element Yeah, that's exactly what's not possible currently...
Goes a little into the direction of [Cast free arrays](https://github.com/WebAssembly/gc/issues/138), since if the type is nullable but isn't in the source language, you'll end up with superfluous casts again that...
> Yes, welcome to 50 years of realloc implementations. Looks like you are an experienced engineer. How would you tackle the problems of superfluous casts / non-interoperability when doing nothing...
> The initial GC design can't solve all things for all languages Well, AS isn't really that special tbh. It's much like Java and C# for instance. Furthermore, I guess...
It is indeed not an option for AS to have non-interoperable arrays with JS. Defeats the whole point of why AS exists / what people want to do with it....
Hmm, good points. So the use case I have in mind is Wasm code calling Web APIs that expect one or more (object) arrays as arguments (also vice-versa). With a...
Perhaps a few potential solutions I collected from offline feedback so far, for consideration: ## Separate WTF-16 In Interface Types, define: ``` string := list char string16 := list u16...