Inclusion of Parenthesis on Certain Functions

mw mingwu at gmail.com
Sun Jun 13 15:52:15 UTC 2021


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 explanation for why 
> you can use it without parenthesis.


Uniform Function Call Syntax (UFCS)

https://tour.dlang.org/tour/en/gems/uniform-function-call-syntax-ufcs




More information about the Digitalmars-d-learn mailing list