On Sat, Apr 25, 2020 at 02:03:57PM -0400, Noel Chiappa wrote:
From: Rob Pike
To make chaining of calls simpler. Write
f()->g()->h()->i()
the other way
You mean:
(*f)((*g)((*h)((*i)())))
I dunno, it doesn't seem that much worse to me.
No, I think he means something like:
(*((*((*((*f)()->g))()->h))()->i))()
but I can't recall the relative priority of '*' and '->' in
the above, so I may have added unnecessary parens.
Or was he thinking of having to use '.' as well to access
the member pointers within the structs?
DF