Thread overview
[Issue 6027] New: bigint to!string conversion and its implications
May 18, 2011
Vladimir Matveev
May 19, 2011
Don
May 20, 2012
Kenji Hara
May 18, 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@puremagic.com
        ReportedBy: dpx.infinity@gmail.com


--- Comment #0 from Vladimir Matveev <dpx.infinity@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: -------
May 18, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6027


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from bearophile_hugs@eml.cc 2011-05-18 13:46:37 PDT ---
See also issue 5970 and issue 5971

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 19, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6027


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2011-05-18 21:10:22 PDT ---
(In reply to comment #0)
> 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)).

That worked in a previous release. It should still work.

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


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2012-05-19 18:48:34 PDT ---
Now to!string(BigInt(123)) works as expected. And bug 6023 is not relevant to
toString issue.
If there is other issues still, please reopen.

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