What's nice about this: the remote code doesn't need to be in a different script. Since the remote and local are the same file, there is only one file to worry about. Issues around executing scripts remotely go away such as versioning, check sums, permissions, and managing the PATH.
What's not nice: there is no return. Once you use exec, local execution stops, so you really have to be done doing stuff locally. Of course, you or I can probably come up with a way around that drawback by forking another process, but the script is getting increasingly convoluted. Also, one can't do things on multiple servers using this technique alone . The remote bash process is executing code from a pipe not a file. I'm not certain what would happen if you tried to tail that file handle, but it probably wouldn't make you happy. You can always use here docs though.