std.format.doFormat and std.format.formattedWrite
Simen Kjærås
simen.kjaras at gmail.com
Thu Mar 1 13:40:18 PST 2012
On Thu, 01 Mar 2012 20:55:14 +0100, Stewart Gordon <smjg_1998 at yahoo.com>
wrote:
> There are several bug reports along the lines of std.stdio.writef* and
> std.string.format and stream writef* functions behaving inconsistently
> with each other.
>
> So far I've found:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=4532
> http://d.puremagic.com/issues/show_bug.cgi?id=5687
> http://d.puremagic.com/issues/show_bug.cgi?id=6595
> http://d.puremagic.com/issues/show_bug.cgi?id=7571
> http://d.puremagic.com/issues/show_bug.cgi?id=7620
>
> Really, they're all one bug, namely the use of two divergent functions
> that have the same purpose: doFormat and formattedWrite.
>
> Under D1, we had only doFormat. In D2, formattedWrite has superseded
> doFormat; nonetheless, some bits of Phobos are still using doFormat.
>
> 6595 is "std.string.format() and sformat() are obsolete". It seems to
> be advocating killing doFormat once and for all. However, the pull
> request doesn't go anywhere near this far, and there is even a call to
> doFormat in the unchanged lines of the pull. Really, it only makes sense
> to get the migration from doFormat to formattedWrite finished once and
> for all.
>
> But meanwhile, what to do with these duplicate bug reports? Change the
> summary 4532 to reflect the true nature of the problem and then dupe the
> others to it? Or open a new bug report that is straight and to the
> point about it, and dupe those to it? Or list the old bugs as
> dependencies rather than dupes of the new root cause bug?
>
> (Example from years ago of manifestations of a bug being done as
> dependencies:
> https://bugzilla.mozilla.org/show_bug.cgi?id=57724
> )
>
I'd say change 4532.
More information about the Digitalmars-d
mailing list