Hacker News new | ask | show | jobs
by laumars 4434 days ago
I appreciate something like this is best served in the compiler, but would it not be possible to build your own function that provides this functionality?
1 comments

Sorta impossible. You can't suck values out of the current context, even with reflection. You always would need to pass values into a function, in which case you might as well use fmt.
I suspected that might have been the case but I haven't played around with reflection enough personally.

Shame :(