59 ms·
Interesting, but how do you define a function that returns an array? Maybe: T f(args)[..] { body } This would be hard to parse. Then what about: T[..] f(
by teo_zero 3y ago
Interesting, but how do you define a function that returns an array? Maybe:
T f(args)[..] { body }
This would be hard to parse. Then what about:
T[..] f(args) { body }
But if adding [] after T is allowed in function declaration, then why not for arrays as well:
T[..] a;
- sigsev_251 3y agoVery nice comment. This was a blocking point I fell onto too. There is another option, to not allow spans on the return channel, but I don't know how people who handle resources with lifetimes that exceed the function scope will take this. Just like you, I'm curious to see what how this will be solved.