draft proposal for Sum Types for D

Hipreme msnmancini at hotmail.com
Thu Dec 1 13:21:05 UTC 2022


On Thursday, 1 December 2022 at 12:55:17 UTC, ryuukk_ wrote:
> On Thursday, 1 December 2022 at 12:48:04 UTC, ryuukk_ wrote:
>
>
> Forgot to add, good ressources for WASM without emscripten, 
> that's what i followed basically:
>
> https://schellcode.github.io/webassembly-without-emscripten
>
>
> Also an example of a language that follows this principle: Odin:
>
> https://github.com/odin-lang/Odin/tree/master/vendor/wasm
>
>
> This is imo the proper way to do it
>
> And you can still use emscripten btw: 
> https://theartofmachinery.com/2018/12/20/emscripten_d.html
>
> So druntime/phobos might be working out of the box, but will 
> produce rather large wasm files
>
> I'll give that a try some day


Actually it dont: `Instead of porting the D runtime, it uses a 
lightweight, runtimeless -betterC build.`

Doing a simple game without GC is possible, but when you wish to 
use GC and standard library this is the problem.

If one wishes to offer a not bloated solution, one can use 
betterC, having the option for me is the best thing to do. I have 
done my own standard library to use in D, which avoids many 
templates, many imports depending from the libc, still, it is 
quite far from having real support on WASM.

Though I think the main problem it has is using associative 
arrays, I have my own implementation of ref counted associative 
arrays, but I'm not using. I should consider a bit about this.


More information about the Digitalmars-d mailing list