Re: @nogc for structs, blocks or modules?

2016-02-16 Thread John Colvin via Digitalmars-d
On Tuesday, 16 February 2016 at 03:13:48 UTC, maik klein wrote: On Tuesday, 16 February 2016 at 02:47:38 UTC, WebFreak001 wrote: On Tuesday, 16 February 2016 at 02:42:06 UTC, maik klein wrote: I just seems very annoying to add @nogc to every function. you can mark everything as nogc with //

Re: @nogc for structs, blocks or modules?

2016-02-15 Thread jmh530 via Digitalmars-d
On Tuesday, 16 February 2016 at 03:13:48 UTC, maik klein wrote: Thanks, this should probably added to https://dlang.org/spec/attribute.html#nogc It's actually in there, it's just easy to miss. It's the box with the text after "Attributes are a way to modify one or more declarations. The

Re: @nogc for structs, blocks or modules?

2016-02-15 Thread rsw0x via Digitalmars-d
On Tuesday, 16 February 2016 at 03:41:12 UTC, Era Scarecrow wrote: On Tuesday, 16 February 2016 at 03:13:48 UTC, maik klein wrote: I just realized that I can't even use @nogc because pretty much nothing in phobos uses @nogc Or it hasn't been tagged @nogc or based on templates they can't be

Re: @nogc for structs, blocks or modules?

2016-02-15 Thread Era Scarecrow via Digitalmars-d
On Tuesday, 16 February 2016 at 03:13:48 UTC, maik klein wrote: I just realized that I can't even use @nogc because pretty much nothing in phobos uses @nogc Or it hasn't been tagged @nogc or based on templates they can't be preemptively marked it. I'd think most ranges could be @nogc; And

Re: @nogc for structs, blocks or modules?

2016-02-15 Thread maik klein via Digitalmars-d
On Tuesday, 16 February 2016 at 02:47:38 UTC, WebFreak001 wrote: On Tuesday, 16 February 2016 at 02:42:06 UTC, maik klein wrote: I just seems very annoying to add @nogc to every function. you can mark everything as nogc with // gc functions here @nogc: // nogc functions here void foo() {}

Re: @nogc for structs, blocks or modules?

2016-02-15 Thread WebFreak001 via Digitalmars-d
On Tuesday, 16 February 2016 at 02:42:06 UTC, maik klein wrote: I just seems very annoying to add @nogc to every function. you can mark everything as nogc with // gc functions here @nogc: // nogc functions here void foo() {}

@nogc for structs, blocks or modules?

2016-02-15 Thread maik klein via Digitalmars-d
I am probably the minority but I almost never use the GC in D. Because I never use the GC I could mark 99% of my functions with @nogc. I just seems very annoying to add @nogc to every function. For people like me it seems that it could be a nice addition to also allow @nogc for structs like