February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #10 from Andrei Alexandrescu <andrei@metalanguage.com> 2012-01-31 16:26:16 PST ---
(In reply to comment #9)
> (In reply to comment #8)
> > The feature is not implemented, and the simple patch does too little to help in that direction.
> 
> That's like refusing to add an autosave feature to an app because it does too little to help stop the program crashing.

I fail to derive much from this comparison, sorry.

> (In reply to comment #8)
> > Please let's leave this closed, this future direction doesn't belong to bugzilla.  Thanks.
> 
> What do you mean by this?  I thought that we were all agreed by now that enhancement requests are welcome here.

This is not an enhancement request. It is a possible future feature that we are well aware of, will not be forgotten, and should be present in a longer-term document (as opposed to here). Let's leave this closed and focus on more workable action items. Thanks!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #11 from Stewart Gordon <smjg@iname.com> 2012-01-31 16:52:39 PST ---
(In reply to comment #10)
> This is not an enhancement request.

I still don't understand that statement in the slightest.

> It is a possible future feature that we are well aware of, will not be forgotten, and should be present in a longer-term document

True.  But in a longer-term document for what purpose?  To be a record of someone having requested an improvement that will never be implemented?

> (as opposed to here).

If a D user wants a given feature/improvement, it's perfectly reasonable of them to post it here, at least in my understanding.  Whether the people in charge are going to implement or not is another matter - it's half the purpose of resolutions, not of arguing over whether it should ever have been filed here in the first place.

> Let's leave this closed and focus on more workable action items. Thanks!

OK.  But please note that Walter himself hasn't commented on this in over 4 years now.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #12 from Walter Bright <bugzilla@digitalmars.com> 2012-01-31 16:54:48 PST ---
>The point of doing this is to enable libraries to support cent/ucent _if_ the
language/compiler/platform supports it, by using a static if to test whether the type exists.

You can do something like:

   static if (__traits(compiles, { ucent a = 3; })) ...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #13 from Andrei Alexandrescu <andrei@metalanguage.com> 2012-01-31 16:59:24 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > This is not an enhancement request.
> 
> I still don't understand that statement in the slightest.

Sorry, I only now see how that might be confusing. I was referring to "implement cent/ucent", as opposed to this particular patch.

> > Let's leave this closed and focus on more workable action items. Thanks!
> 
> OK.  But please note that Walter himself hasn't commented on this in over 4 years now.

Thanks for your understanding.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #14 from Stewart Gordon <smjg@iname.com> 2012-01-31 17:29:40 PST ---
(In reply to comment #12)
> >The point of doing this is to enable libraries to support cent/ucent _if_ the
> language/compiler/platform supports it, by using a static if to test whether the type exists.
> 
> You can do something like:
> 
>    static if (__traits(compiles, { ucent a = 3; })) ...

Under DMD 2.057 with the most trivial use:

static if (__traits(compiles, { ucent a = 3; })) {}

cent_compiles.d(1): found 'ucent' instead of statement

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785


yebblies <yebblies@gmail.com> changed:

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


--- Comment #15 from yebblies <yebblies@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: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #16 from Walter Bright <bugzilla@digitalmars.com> 2012-01-31 19:20:29 PST ---
Not bad, but they should be in TypeBasic.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #17 from yebblies <yebblies@gmail.com> 2012-02-01 14:26:05 EST ---
(In reply to comment #16)
> Not bad, but they should be in TypeBasic.

I know, but TypeBasic doesn't have a custom semantic routine and has no support for 128bit types, so I don't want to mix it in with that code yet.

Is this something you would consider a blocker to merging the patch?  If so I'll have a go at integrating it with TypeBasic.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785



--- Comment #18 from Walter Bright <bugzilla@digitalmars.com> 2012-01-31 19:53:30 PST ---
Yes, it would be a blocker.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
            Version|D1                          |D1 & D2
         AssignedTo|bugzilla@digitalmars.com    |yebblies@gmail.com


--- Comment #19 from yebblies <yebblies@gmail.com> 2012-02-01 15:52:52 EST ---
Ok.  Redone as TypeBasic - easier than I expected.

https://github.com/D-Programming-Language/dmd/pull/672

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