I did not mean to suggest that one cannot, or should not, use the same code on client and server. It's a good idea. What I suggest is that -- in your words -- it requires "discipline". Such discipline is a conscious process, one which requires the programmer to be fully aware of where the client/server dividing line is. When you abstract away that dividing line you make the discipline harder.
Comments
I did not mean to suggest that one cannot, or should not, use the same code on client and server. It's a good idea. What I suggest is that -- in your words -- it requires "discipline". Such discipline is a conscious process, one which requires the programmer to be fully aware of where the client/server dividing line is. When you abstract away that dividing line you make the discipline harder.