Yes, you can use {.global.} for return values, but I'm not sure that you can
save allocations, especially if a and b were to be modified after calling t().
I think there is some library that uses this pattern for caching purposes, but
I don't quite remember.
As for the final paragraph, I'm not sure how that's related. Yes, there are a
few naive examples where Python might outperform Nim that appear strange to
those without a stronger CS background, but there are many [naive code
examples](https://stackoverflow.com/questions/9688305/python-faster-than-c-how-does-this-happen)
[in other
languages](https://stackoverflow.com/questions/9371238/why-is-reading-lines-from-stdin-much-slower-in-c-than-python?noredirect=1&lq=1)
[where the
benchmarks](https://stackoverflow.com/questions/31922171/why-my-c-sharp-code-is-faster-than-my-c-code?noredirect=1&lq=1)
[have unintuitive
results](https://stackoverflow.com/questions/5952287/why-is-this-java-code-6x-faster-than-the-identical-c-sharp-code?rq=1).
But again, not everyone who tries Nim will be try to be rational and may end
up dropping it like you said.