In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
But it is called differently:
getChar(); // obviously SkipWhitespace = true;
getChar!true(); // probably getchar(true)
What is the reason for the different notation ?
Peter
On Wednesday, 20 March 2013 at 20:11:47 UTC, Peter Sommerfeld
wrote:
In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
It looks like the signature (line 115) is:
dchar getChar(bool SkipWhitespace = false)()
Note the extra set of parens at
On 03/20/2013 01:11 PM, Peter Sommerfeld wrote:
In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
That 'false' up there is the default value of SkipWhitespace.
But it is called differently:
getChar(); // obviously SkipWhitespace = true;
On 03/20/2013 01:27 PM, Ali Çehreli wrote:
getChar(); // obviously SkipWhitespace = true;
No, in that case SkipWhitespace==true.
I said No but kept your value. :) I meant No, in that case
SkipWhiteSpace==false.
Ali
cal wrote:
On Wednesday, 20 March 2013 at 20:11:47 UTC, Peter Sommerfeld wrote:
In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
It looks like the signature (line 115) is:
dchar getChar(bool SkipWhitespace = false)()
Note the extra set of
Ali Çehreli:
Aside: bool parameters (regular or template) hurt readability. It would
be better to have defined a type similar to std.stdio.KeepTerminator and
its use with byLine():
http://dlang.org/phobos/std_stdio.html#.File.byLine
I see. On the other hand: For an internal function