On Monday, 5 February 2024 at 16:46:20 UTC, Paul Backus wrote:
>On Monday, 5 February 2024 at 16:36:02 UTC, monkyyy wrote:
>On Monday, 5 February 2024 at 15:40:11 UTC, Paul Backus wrote:
> >I think our goal is to make -betterC
obsolete. As in: if you don't use the feature, you don't pay for it, and it's implicit.
Even in the 100% pay-as-you-go world, I think we'll still want Phobos APIs to avoid depending on (and paying for) more druntime features than they really need to.
This feels delusional to me; like I don't know how the formal style with its contracts and extra asserts and 5 layered datetime will ever avoid rogue imports that aren't part of a blessed compile environment.
The way you avoid this stuff is by testing. Run your unit tests with -betterC
and any accidental druntime dependencies you add will be revealed to you very quickly.
That just adds a singluar blessed environment, it will be very very unlikely that it will compile on wasm, a new embedded chip that releases in 2025, bsd, or a new rust os in 2040.
Which is a potential option but it's not a mythical "pay-as-you-go" and then you'll see nogc avocates being like "oi I needed to import toStringz but your (algorthim thats 100x simplier with allocation) allocates and broke my code, because of a 9 long import chain of unused code"
https://www.youtube.com/watch?v=a-767WnbaCQ
"just do ___"; no we are not even close to the phase change point, I suggest someone needs an answer for how you reduce the fundamental "order"/R0 of imports, which I think is 2 imports per file, or being extremely strict about local imports being in templates so they dont compile if unused