The "no gc" crowd
Tourist
gravatar at gravatar.com
Tue Oct 8 09:22:00 PDT 2013
On Tuesday, 8 October 2013 at 16:18:50 UTC, Adam D. Ruppe wrote:
> On Tuesday, 8 October 2013 at 16:02:05 UTC, Tourist wrote:
>> On Tuesday, 8 October 2013 at 15:53:47 UTC, Adam D. Ruppe
>> wrote:
>>> 2) have a flag where you can make gc allocations throw an
>>> assert error at runtime for debugging critical sections
>>
>> Why handle it at runtime and not at compile time?
>
> One is I can implement a runtime check pretty easily so it'd
> just be the first step because it would go quickly.
>
> The other reason though would be D doesn't really have an
> attributed section. You can't do:
>
> void foo() {
> // stuff
> @nogc {
> // your performance sensitive loop code
> }
> }
>
> But on the function level, that could be done at compile time
> if implemented.
IMO it would be much more effective if it would be handled at
compile time, both saving the dev's time and guaranteeing that
there are no unwanted assert(0)'s lurking around in untested
corners.
More information about the Digitalmars-d
mailing list