[Issue 18048] New: std.bigint.toDecimalString is impure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 8 17:49:20 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18048

          Issue ID: 18048
           Summary: std.bigint.toDecimalString is impure
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: jack at jackstouffer.com

Looking at the code, there's no reason why to decimal string needs to be
impure, it's just that the `toString` of BigInt uses the delegate sink method
of `toString`, which must necessarily be impure, while the underlying function
which actually calculates the string is pure.

toDecimalString should be reworked to be pure

--


More information about the Digitalmars-d-bugs mailing list