Markus Gerwinski wrote:
CBFalconer wrote:
Markus Gerwinski wrote:
Of course, you also can do so by explicitly declaring `result`as a local variable and assigning it to getIndexOf in the end, but personally, I find the above way far more elegant.
Which, to me, means there are no new capabilities introduced by this usage. I find the local variable and final assignment to be much clearer and more elegant. All result has done is provide a synonym for the function name, whose use in an expression will not trigger recursion.
My issue here isn't about capability, but about readability.
And, on the contrary, my issue was about capability. The readability is a style issue. My only concern is whether I am missing some capability issue by eschewing the result mechanism.