like in Go
Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 12, 2021 libc (glibc and others) runtime independance for Dlang programms. - is this possible? | ||||
---|---|---|---|---|
| ||||
November 12, 2021 Re: libc (glibc and others) runtime independance for Dlang programms. - is this possible? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexey | On Friday, 12 November 2021 at 09:55:24 UTC, Alexey wrote: >like in Go Do you mean like betterC? 🤔 |
November 12, 2021 Re: libc (glibc and others) runtime independance for Dlang programms. - is this possible? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexey | Sort of, if you do something like https://github.com/matheusmoreira/liblinux |
November 12, 2021 Re: libc (glibc and others) runtime independance for Dlang programms. - is this possible? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexey | On Friday, 12 November 2021 at 09:55:24 UTC, Alexey wrote: >like in Go I find this a good question and I don't really understand the point of being dependent on libc, especially when D is more than able to cover the functionality of libc completely of its own. However, there might be situations you want it, like using malloc/free from libc rather than the Druntime allocator. This should be a non-default option though. Independence gives D more control over its environment. The disadvantage is that the D project needs to do more, for example right now D is piggy backing on libc initialization (crt0) and if we are not using libc for that the D projects need to write platform dependent initialization which requires more work. The goal for D should be as much libc independence as possible. While it require a lot of work, this approach can be gradual. |
November 12, 2021 Re: libc (glibc and others) runtime independance for Dlang programms. - is this possible? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexey | On Friday, 12 November 2021 at 09:55:24 UTC, Alexey wrote: >like in Go I sort of tried it: https://github.com/BradleyChatha/bcstd I found it pretty hard (unsurprisingly) to account for both Windows and Linux though, and kind of lost motivation for it. |