I didn’t think I would uncover a potentially heated debate!
Coming back to the original discussion, my goal is to document Julia. So the question is more “is it allowed to do … ?” than “is good to do … ?”.
On that front, the fact that
nothing alone is acceptable is self-evident from the “last value gets returned” rule, but the fact that
return implicitly returns
nothing is not so clear (except that it works when tested!). In particular, it is not in the doc of return. So maybe it should be added there as well?
By the way, I didn’t find the source for the doc of the
return keyword (in fact the doc of keywords in general). Does anybody knows where it is in the source tree?