Bug 21562 – Allow mixin template declarations without parentheses

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-20T18:44:04Z
Last change time
2024-12-13T19:14:07Z
Assigned to
No Owner
Creator
Bolpat
Moved to GitHub: dmd#18017 →

Comments

Comment #0 by qs.il.paperinik — 2021-01-20T18:44:04Z
A mixin template declaration needs to have parentheses following the name. If the parentheses are empty, it should be valid to omit them entirely. Grammar changes: TemplateMixinDeclaration: + mixin template Identifier TemplateParameters[opt] Constraint[opt] { DeclDefs[opt] } - mixin template Identifier TemplateParameters Constraint[opt] { DeclDefs[opt] }
Comment #1 by pro.mathias.lang — 2021-01-20T18:51:28Z
I don't think it's worth it to change the grammar for such a marginal gain in writability. Is there any reason for this request ?
Comment #2 by qs.il.paperinik — 2021-01-21T10:15:22Z
Just a random thought. Laziness is the main driver.
Comment #3 by robert.schadek — 2024-12-13T19:14:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18017 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB