Syntax of...

Justin P. j20513831 at gmail.com
Sat Apr 11 23:06:21 UTC 2026


On Saturday, 11 April 2026 at 22:12:37 UTC, Serg Gini wrote:
> On Saturday, 11 April 2026 at 21:01:33 UTC, Justin P. wrote:
>> Where, in the documentation, might I find an understanding 
>> behind the following, syntactically:
>> auto result = ["whoami"].execute
>> I believe, I understand `auto,' but of calling execute() on an 
>> array of strings..?
>
> https://dlang.org/library/std/process/execute.html
>
> It is just UFCS which allows instead of:
> ```d
> func(params)
> ```
> write it in version:
> ```d
> params.func
> ```
>
> So in D (as it is very Elegant) you can write:
> ```d
> 4.writeln
> ```
> and it will print "4"
When operating on an array, can I assume that it will return an 
array?:: auto x=["who","whoami"].execute



More information about the Digitalmars-d-learn mailing list