[Issue 5416] New: null should have a type of its own

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 5 16:33:08 PST 2011


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

           Summary: null should have a type of its own
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: simen.kjaras at gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2011-01-05 16:30:53 PST ---
Currently, it is impossible to special-case comparisons with null. If instead
null had its own type, one could allow direct comparisons between user-defined
types and null, instead of supporting comparison with any and all void*s.

For structs, such a comparison function could then be used for both 'foo ==
null' and 'foo is null'. For classes, neither likely makes sense.

-- 
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