Great article defending concatenative programming as a paradigm, and discussing how you statically type check subroutines that leave values on the stack: https://evincarofautumn.blogspot.co.uk/2012/02/why-concatenative-programming-matters.html