www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6027] New: bigint to!string conversion and its implications

reply d-bugmail puremagic.com writes:
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



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
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6027


bearophile_hugs eml.cc changed:

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



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 18 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6027


Don <clugdbug yahoo.com.au> changed:

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




 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 18 2011
prev sibling parent d-bugmail puremagic.com writes:
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



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: -------
May 19 2012