Proposed strategy to support WASM in D

Adam D Ruppe destructionator at gmail.com
Sat Nov 19 01:57:21 UTC 2022


On Saturday, 19 November 2022 at 01:16:00 UTC, Pierce Ng wrote:
> Without modifying TIC-80 source code, is there a way to do some 
> 'namespace' thingie for D like how Zig does it?

All D symbols are namespaced by their module name. You can expose 
the JS functions in different modules.

I don't know your specific problem but it ought to just be a case 
of adjusting the imports on JS and using them through different 
modules in D.

> More generally, as a D newbie, the confusion for me was (still 
> is): Should I be writing D programs (whether for TIC-80 or more 
> mundane platforms like Linux) in D, or in BetterC?

Always use real D unless it is impractical to do so. No point 
going through suffering when you don't have to.


More information about the Digitalmars-d mailing list