Re: Proposal: __not(keyword)

2018-09-15 Thread Steven Schveighoffer via Digitalmars-d
On 9/14/18 11:06 AM, Adam D. Ruppe wrote: It also affects attrs brought through definitions though: shared class foo {    int a; // automatically shared cuz of the above line of code    __not(shared) int b; // no longer shared } Aside from Jonathan's point, which I agree with, that the

Re: Proposal: __not(keyword)

2018-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 14 September 2018 at 18:13:49 UTC, Eugene Wissner wrote: Makes the code unreadable. It is the foo: that causes this, not the __not... For @nogc, pure and so forth there were imho a better proposal with a boolean value: @gc(true), @gc(false), pure(true), pure(false) etc. It is also

Re: Proposal: __not(keyword)

2018-09-14 Thread Jonathan M Davis via Digitalmars-d
On Friday, September 14, 2018 12:44:11 PM MDT Neia Neutuladh via Digitalmars-d wrote: > On Friday, 14 September 2018 at 18:13:49 UTC, Eugene Wissner > > wrote: > > Makes the code unreadable. You have to count all attributes in > > the file, then negate them. Nobody should write like this and > >

Re: Proposal: __not(keyword)

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 18:13:49 UTC, Eugene Wissner wrote: Makes the code unreadable. You have to count all attributes in the file, then negate them. Nobody should write like this and therefore it is good, that there isn't something like __not. For @nogc, pure and so forth there were

Re: Proposal: __not(keyword)

2018-09-14 Thread Eugene Wissner via Digitalmars-d
On Friday, 14 September 2018 at 18:06:55 UTC, Adam D. Ruppe wrote: Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. __not(final) void foo() {} // turns off the final flag (if it is set) __not(@nogc) void foo() {} // turns off the @nogc flag (if

Re: Proposal: __not(keyword)

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 18:06:55 UTC, Adam D. Ruppe wrote: Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. From your lips to G*d's ears.

Proposal: __not(keyword)

2018-09-14 Thread Adam D. Ruppe via Digitalmars-d
Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. __not(final) void foo() {} // turns off the final flag (if it is set) __not(@nogc) void foo() {} // turns off the @nogc flag (if it is set) __not(const)(int) a; // not const All it does is