On Wednesday, August 2, 2023 12:19:55 PM MDT Cecil Ward via Digitalmars-d-
learn wrote:
> Am I right in thinking that final switch can be used to check
> that all the elements in an enum are handled in cases? Thinking
> that this is a worthwhile safety check, I’d like to convert an
> existing list
On Wednesday, August 2, 2023 12:02:35 PM MDT Nick Treleaven via Digitalmars-d-
learn wrote:
> On Wednesday, 2 August 2023 at 17:55:12 UTC, Nick Treleaven wrote:
> > On Wednesday, 2 August 2023 at 17:52:00 UTC, Nick Treleaven
> >
> > wrote:
> >> Now I'm wondering why those functions are marked `pure
Am I right in thinking that final switch can be used to check
that all the elements in an enum are handled in cases? Thinking
that this is a worthwhile safety check, I’d like to convert an
existing list into an enum for use in a final switch. I have an
existing list which I use elsewhere,
e
On Wednesday, 2 August 2023 at 17:55:12 UTC, Nick Treleaven wrote:
On Wednesday, 2 August 2023 at 17:52:00 UTC, Nick Treleaven
wrote:
Now I'm wondering why those functions are marked `pure` - they
must affect the GC's bookkeeping state.
I guess it was because the GC's internal state is not sup
On Wednesday, 2 August 2023 at 17:52:00 UTC, Nick Treleaven wrote:
Now I'm wondering why those functions are marked `pure` - they
must affect the GC's bookkeeping state.
Here's the pull that added it:
https://github.com/dlang/druntime/pull/3561
On Wednesday, 2 August 2023 at 13:27:50 UTC, Steven Schveighoffer
wrote:
On 8/2/23 7:40 AM, Nick Treleaven wrote:
Presumably an allocation like `new T` (for a type with a @safe
constructor) can be made anywhere a call to `GC.collect` can
be made, which may trigger a collection. So why isn't
`G
On 8/2/23 7:40 AM, Nick Treleaven wrote:
Presumably an allocation like `new T` (for a type with a @safe
constructor) can be made anywhere a call to `GC.collect` can be made,
which may trigger a collection. So why isn't `GC.collect` marked @safe?
It should be. Maybe historical reasons?
One pos