debug a reserved keyword (even for enums?)

Quirin Schroll qs.il.paperinik at gmail.com
Mon Apr 13 11:01:00 UTC 2026


On Sunday, 12 April 2026 at 23:12:23 UTC, An Pham wrote:
> On Sunday, 12 April 2026 at 19:55:13 UTC, Walter Bright wrote:
>> What you're suggesting is that `debug` be a context sensitive 
>> keyword.
>>
>> D has some context sensitive keywords, such as:
>>
> D should convert some keywords into attribute instead. "debug" 
> is one of them.
> 1. It is rarely used
> 2. It is attribute to a function or scope block
>
> `@debug .... ;`
> `@debug {}`
>
> So, D should reduce keywords usage. Time to re-evaluate the 
> list to make D less friction

Attributes are invalid in statement scope. I’d rather have 
`__debug`. `debug` isn’t an attribute, we shouldn’t pretend it is 
one.


More information about the Digitalmars-d mailing list