[Issue 785] Make 'cent' and 'ucent' syntactically valid pending implementation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 31 16:05:35 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=785
--- Comment #9 from Stewart Gordon <smjg at iname.com> 2012-01-31 16:05:30 PST ---
(In reply to comment #7)
> I agree with Walter on this one. cent and ucent are merely
> keywords in preparation for if/when we decide to add 128-bit
> integer types to the language. Keywords are plenty for that. I
> see no reason to expect any code written with them to work on any
> level.
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.
> or why anyone would think that writing code now with cent or ucent
> with the idea that it will work later makes sense.
For many library features, it makes sense to support operations on all of the
integer types, for example:
- construction of a bigint or bit array from an integer or array thereof
- conversion of a bigint or a bit array to an array of integers
- file I/O and communications
Why shouldn't someone who implements the same feature for for byte, ubyte,
short, ushort, int, uint, long and ulong be allowed to implement it for cent
and ucent as well while at it?
Moreover, if we decide to support it only on those platforms that natively
implement it, or support it on those platforms before implementing it for those
that don't, why should library writers be prevented from supporting it by the
requirement for the library to work on those platforms that don't have 128-bit
integer arithmetic built in?
Or are you suggesting that all the use cases are covered by templates?
(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.
(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.
--
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