On Monday, 14 June 2021 at 18:08:27 UTC, Justin Choi wrote:
Is there any shortcut for unpacking slices like I'd want to do
in a scenario like this?
`info = readln.strip.split;`
`string a = info[0], b = info[1], c = info[2];`
This doesn't leave you with multiple local variables, but it
leaves
On Monday, 14 June 2021 at 18:08:27 UTC, Justin Choi wrote:
Is there any shortcut for unpacking slices like I'd want to do
in a scenario like this?
`info = readln.strip.split;`
`string a = info[0], b = info[1], c = info[2];`
I tried to implement PHP's "list" language construct here, which
On 6/14/21 11:08 AM, Justin Choi wrote:
Is there any shortcut for unpacking slices like I'd want to do in a
scenario like this?
`info = readln.strip.split;`
`string a = info[0], b = info[1], c = info[2];`
D does not have automatic unpacking. Here is a quick, dirty, and fun
experiment: