Re: Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 13 June 2021 at 15:45:53 UTC, Justin Choi wrote: I've tried looking through the documentation but can't find an explanation for why you can use it without parenthesis. https://dlang.org/spec/function.html#optional-parenthesis (Some exceptions regarding delegates and function

Re: Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Jun 13, 2021 at 03:45:53PM +, Justin Choi via Digitalmars-d-learn wrote: > I'm currently learning D right now, and I was wondering why certain > functions like std.stdio.readln can work both with and without > parenthesis for the function call. I've tried looking through the >

Re: Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread mw via Digitalmars-d-learn
On Sunday, 13 June 2021 at 15:45:53 UTC, Justin Choi wrote: I'm currently learning D right now, and I was wondering why certain functions like std.stdio.readln can work both with and without parenthesis for the function call. I've tried looking through the documentation but can't find an

Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread Justin Choi via Digitalmars-d-learn
I'm currently learning D right now, and I was wondering why certain functions like std.stdio.readln can work both with and without parenthesis for the function call. I've tried looking through the documentation but can't find an explanation for why you can use it without parenthesis.