As for a performance, both are identical in Tcl 8.6, but as for a style, *return...* seems to be better.
Also, *return* makes a code a bit more self-documented, as if saying:
look, this procedure can be used in expressions.
And *return* (as well as *proc* and *method*) command is highlighted by
some editors, so that a code with *proc* + *return* is framed with them, which make the code more viewable.
At last, if a procedure returns values in several places, the last
command must be *return*. It's an insurance against possible mistakes
and a matter of good taste.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 741 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 64:30:07 |
| Calls: | 12,446 |
| Calls today: | 1 |
| Files: | 15,194 |
| Messages: | 6,537,541 |