digitalmars.D.learn - Syntax of...
- Justin P. (5/5) Apr 11 Where, in the documentation, might I find an understanding behind
- Serg Gini (15/20) Apr 11 https://dlang.org/library/std/process/execute.html
- Justin P. (3/23) Apr 11 When operating on an array, can I assume that it will return an
- Sergey (6/8) Apr 12 mm no..
- Steven Schveighoffer (3/8) Apr 12 https://dlang.org/spec/function.html#pseudo-member
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..?
Apr 11
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"
Apr 11
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:When operating on an array, can I assume that it will return an array?:: auto x=["who","whoami"].executeWhere, 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"
Apr 11
On Saturday, 11 April 2026 at 23:06:21 UTC, Justin P. wrote:When operating on an array, can I assume that it will return an array?:: auto x=["who","whoami"].executemm no.. it doesn't matter as function has 2 types `OutType func(InputType x)` You can have different types for input arguments and output arguments.
Apr 12
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/spec/function.html#pseudo-member -Steve
Apr 12









Sergey <kornburn yandex.ru> 