[Issue 4272] New: x.typeof syntax

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 4 15:42:56 PDT 2010


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

           Summary: x.typeof syntax
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-06-04 15:42:55 PDT ---
A syntax like x.typeof can be considered.

There are situations where you will need to parenthesize anyway, like:

import std.stdio;
void main() {
    int x = 1;
    float y = 1.5;
    writeln(typeid(typeof(x + y)));
}


You will have to write:
(x + y).typeof


But in many situations with this change you will be able to avoid the ().

This syntax is more similar/uniform to the x.sizeof syntax too (that is
sizeof(x) in C).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list