Syntax of...
Serg Gini
kornburn at yandex.ru
Sat Apr 11 22:12:37 UTC 2026
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"
More information about the Digitalmars-d-learn
mailing list