http://d.puremagic.com/issues/show_bug.cgi?id=7364

           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
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis <verylonglogin....@gmail.com> 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
punished.
* 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to