[Issue 19619] New: Temporary solution for attribute extensibility problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 26 16:27:17 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19619
Issue ID: 19619
Summary: Temporary solution for attribute extensibility problem
Product: D
Version: D2
Hardware: All
URL: https://forum.dlang.org/thread/qnrkfiqmtqzpyocxxtsk@fo
rum.dlang.org
OS: All
Status: NEW
Keywords: spec
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dfj1esp02 at sneakemail.com
Given difficulties with adding compiler recognized attributes as seen in
DIP1017, how about temporarily reserving UDAs with certain naming convention as
keywords (like @safe)? Because they have usual UDA syntax, their status as
keywords can be lifted later (ldc and gdc already implement compiler recognized
UDAs).
Possible naming conventions:
1. Prefix 'd', e.g. @dnoreturn
2. Prefix '_', e.g. @_noreturn or @_noreturn_
3. Prefix 'core', e.g. @core_noreturn
Declared like
---
module core.attribute;
struct noreturn { bool enabled; }
alias noreturn _noreturn_;
---
Compiler should create normal UDAs for them to verify that specified symbols
are visible (declared in core.attribute).
Can this simplify language extensibility?
--
More information about the Digitalmars-d-bugs
mailing list