[Issue 785] Make 'cent' and 'ucent' syntactically valid pending implementation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 31 19:14:37 PST 2012


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


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |yebblies at gmail.com
         Resolution|WONTFIX                     |


--- Comment #15 from yebblies <yebblies at gmail.com> 2012-02-01 14:14:35 EST ---
I actually think this is something worth asking for.
I intend to have a go at implementing cent and ucent once I understand more of
the backend code, so it hopefully isn't too far off.

The following code gives _parsing_ errors, which doesn't make a lot of sense.

version(none) cent x;
static if (is(cent)) {}
static if (__traits(compiles, { cent x; }))

If this was like macro, and we didn't know what cent/ucent support might
eventually look like, then it would make sense to reject it that early.  But we
know cent/ucent will behave exactly like the rest of the built in integer
types.

The solution is trivial:

https://github.com/yebblies/dmd/commit/52028d5b0995744b8241e6c27c6fc1ea894ee3e6

Please take a look and tell me what we lose by adding this to the language.

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