Drawbacks of exceptions being globally allocated

Tejas notrealemail at gmail.com
Mon Aug 16 06:36:10 UTC 2021


On Monday, 16 August 2021 at 06:17:22 UTC, Alexandru Ermicioi 
wrote:
> On Monday, 16 August 2021 at 06:12:14 UTC, Tejas wrote:
>> ...
>
> Fyi, check out std.exeprimental.allocator package. You can use 
> allocators from there to do allocation of exceptions, on the 
> heap or any other region.

Yes, I know about Mallocator. would've been nice to be able to do 
it just via the language and runtime features that are @nogc. And 
I'll have to do deallocation manually with that as well anyways.

When transpiling the C++ code, I really don't want to mix 
standard libraries, hence the desire to keep things contained 
just to the compiler/runtime as much as possible.

Of course, things like `Octal` are going to force me to use 
phobos anyways, so I'm thinking to just introduce a new scope and 
import these packages there in order to prevent names from 
clashing, but I also don't want an excessive amount of `{...}` 
littering the transpiled code...
Ah, I'll see to all this later, thank you very much for your 
time, everyone


More information about the Digitalmars-d-learn mailing list