[Issue 6027] New: bigint to!string conversion and its implications
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 18 07:31:53 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6027
Summary: bigint to!string conversion and its implications
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: dpx.infinity at gmail.com
--- Comment #0 from Vladimir Matveev <dpx.infinity at gmail.com> 2011-05-18 07:27:44 PDT ---
I know about issue http://d.puremagic.com/issues/show_bug.cgi?id=5231 , but
still the problem exists. It is ok (for me, at least) not to have an ability to
use writeln(BigInt(16)). But the design decision not to have string toString()
method also affects another parts of the library. There are at least two such
places.
First is to!string function. I think that it should work uniformly for all
sensible datatypes, and I expect the following equation to work: to!string(123)
== to!string(BigInt(123)), because I see no reason against it.
Second is, maybe, an implication of the first. See issue
http://d.puremagic.com/issues/show_bug.cgi?id=6023 .
I think this is not a correct situation. There may be reasons why I can't use
BigInt-valued random number, but these reasons certainly must not include the
inability to do BigInt->string conversion without useless format specifiers.
--
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