Thread overview | |||||
---|---|---|---|---|---|
|
January 29, 2011 std.format example not working | ||||
---|---|---|---|---|
| ||||
Firt, i would like to know if you are interested in receiving comments an bug reports for DMD V1. If yes, then the following example does not work: http://www.digitalmars.com/d/1.0/phobos/std_format.html import std.c.stdio; import std.format; void formattedPrint(...) { void putc(char c) {fputc(c, stdout);} std.format.doFormat(&putc, _arguments, _argptr); } declaring: void putc(dchar c) fixes the problem. Also to a D newbee like me, _arguments and _argptr are confusing. _arginfo or _argtype is more significant. _argptr could be _arglist or _argvalue or _arguments Those names would be a better fit to the explanations given. _ |
January 29, 2011 Re: std.format example not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Akakima | On Fri, 28 Jan 2011 23:30:06 -0500, Akakima wrote: > Firt, i would like to know if you are interested in receiving comments an bug reports for DMD V1. D1 bugs are still fixed, so bug reports are welcome. http://d.puremagic.com/issues/ D1 has been declared stable, though, so there is usually no point in submitting enhancement requests for it. > If yes, then the following example does not work: > > http://www.digitalmars.com/d/1.0/phobos/std_format.html > > import std.c.stdio; > import std.format; > void formattedPrint(...) > { > void putc(char c) {fputc(c, stdout);} std.format.doFormat(&putc, > _arguments, _argptr); > } > > > declaring: void putc(dchar c) fixes the problem. That's a bug in the documentation, please report. :) > Also to a D newbee like me, _arguments and _argptr are confusing. > > _arginfo or _argtype is more significant. _argptr could be _arglist or _argvalue or _arguments > > Those names would be a better fit to the explanations given. That, on the other hand, would be a breaking change, so it won't happen. -Lars |
January 29, 2011 Re: std.format example not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars T. Kyllingstad | > > D1 bugs are still fixed, so bug reports are welcome. > > http://d.puremagic.com/issues/ > That's a bug in the documentation, please report. :) Ok. Will submit a report. > > D1 has been declared stable, though, so there is usually no point in submitting enhancement requests for it. > I think that D1 should receive more attention. > > >> Also to a D newbee like me, _arguments and _argptr are confusing. >> >> _arginfo or _argtype is more significant. _argptr could be _arglist or _argvalue or _arguments >> >> Those names would be a better fit to the explanations given. > > That, on the other hand, would be a breaking change, so it won't happen. Does not have to be breaking. You could define new names while keeping the old. Thanks for your attention. |
Copyright © 1999-2021 by the D Language Foundation