Summary: Add better Eponymous Template syntax is needed
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Denis <> 2012-01-25 02:01:41 MSK 
Current Eponymous Template syntax forces one to repeat a template name. It's
bad because:
* Templates often have long names like `FunctionTypeOf` (or longer) so it's
just long to write `alias <...> FunctionTypeOf;`.
* If one will make a misprint in retyping a long template name he will be
* If a template is renamed (can happened with private templates) or a part of
template is moved to an internal template every using of a template name should
be changed appropriately. If one will make a mistake in this renaming, see
previous case.

If, e.g. Alias This syntax will be added (with no more than one `alias this`
per template), things will be significantly better because lots of Phobos (a
real world library example) eponymous template aliases something. And now these
templates look terrible. More than that, `this` is a keyword and will be
highlighted in most editors unlike current syntax.

Inspired by "Aliasing of template results" post in NG by Alex R´┐Żnne Petersen.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to