On Thursday, 20 October 2016 at 10:36:16 UTC, Manu wrote:
DIP25 introduced return ref to address this issue. Just annotate it correctly?
I mean, it'll work, but it's not the most secure method to rely on the programmer remembering to do it.
True, but isn't that just the case for any extern function? I mean, extern functions are just like that; gotta type the signature right :)
Not sure it's worth runtime logic to attempt to check that someone typed the signature incorrectly...? It's certainly not the only way users could bugger up the extern declaration and cause any number of similar problems.