A 'lazy' compilation mode to make writting multiplatform code easier without having to clutter the project

jmh530 john.michael.hall at gmail.com
Wed Feb 22 14:39:41 UTC 2023


On Wednesday, 22 February 2023 at 14:23:09 UTC, ryuukk_ wrote:
> Hello,
>
> My project is kinda special, i am targeting all 3 major desktop 
> OS's as well as the web with WebAssembly
>
> [snip]
>
> Compiler should know that if i am on windows, when i call 
> ``poll()`` it'll only ever call ``poll_windows()``, why fetch 
> ``import posix = ..;``and compile ``poll_posix()``?
>
> [snip]

If poll_posix is made private, is the compiler smart enough to 
optimize it away on Windows?


More information about the Digitalmars-d mailing list