digitalmars.D - CTFE writeln
- KennyTM~ (3/3) Jul 12 2011 I've just opened a pull request* to enable std.stdio.writeln in CTFE.
- bearophile (5/9) Jul 12 2011 A tidy printing function is needed at CT, and the better CTFE becomes, t...
- Brad Roberts (2/5) Jul 12 2011 Unless it supports everything that the runtime version does, using the s...
- Walter Bright (3/8) Jul 12 2011 I agree with Brad, though I need to look at the actual pull request.
- Nick Sabalausky (11/22) Jul 12 2011 That's insufficient:
I've just opened a pull request* to enable std.stdio.writeln in CTFE. Any comments? *: https://github.com/D-Programming-Language/dmd/pull/237
Jul 12 2011
KennyTM~:I've just opened a pull request* to enable std.stdio.writeln in CTFE. Any comments? *: https://github.com/D-Programming-Language/dmd/pull/237A tidy printing function is needed at CT, and the better CTFE becomes, the more need there is for it. I have suggested the "ctputs" name if it's simple (ctputs is supposed to work equally well at compile time and a run time!). But if you are able to implement the whole writeln, then calling it writeln is better, less names to remember and to use :-) A printing function is not just for debugging. Bye, bearophile
Jul 12 2011
On 7/12/2011 1:20 AM, KennyTM~ wrote:I've just opened a pull request* to enable std.stdio.writeln in CTFE. Any comments? *: https://github.com/D-Programming-Language/dmd/pull/237Unless it supports everything that the runtime version does, using the same name is a bad idea, imho.
Jul 12 2011
On 7/12/2011 7:21 PM, Brad Roberts wrote:On 7/12/2011 1:20 AM, KennyTM~ wrote:I agree with Brad, though I need to look at the actual pull request. There's also pragma(msg, "hello at compile time").I've just opened a pull request* to enable std.stdio.writeln in CTFE. Any comments? *: https://github.com/D-Programming-Language/dmd/pull/237Unless it supports everything that the runtime version does, using the same name is a bad idea, imho.
Jul 12 2011
"Walter Bright" <newshound2 digitalmars.com> wrote in message news:ivj8t7$je7$1 digitalmars.com...On 7/12/2011 7:21 PM, Brad Roberts wrote:That's insufficient: enum x = foo("abc"); string foo(string a) { a ~= "def"; // printf-debug a CTFE: pragma(msg, "a: "~a); // <-- Big Fail return a; }On 7/12/2011 1:20 AM, KennyTM~ wrote:I agree with Brad, though I need to look at the actual pull request. There's also pragma(msg, "hello at compile time").I've just opened a pull request* to enable std.stdio.writeln in CTFE. Any comments? *: https://github.com/D-Programming-Language/dmd/pull/237Unless it supports everything that the runtime version does, using the same name is a bad idea, imho.
Jul 12 2011