All you would need for this is to model each user's interaction with the system as a statement, where a statement could be either code or data, and then sign and encrypt these statements by default and encrypt the statement's decryption key with recipients' public keys as needed.
This might sound esoteric but we could already do this today just by taking something like Unison [1] and adding this encryption layer.
As geeks we should really own up to the fact that it's perfectly feasible to do this... and get working on it.
P.S. For a fun fact; at it's core such a language would pretty much be what John McCarthy described as 'the language for the year 2015.' [2]
[1] http://unisonweb.org [2] http://lambda-the-ultimate.org/node/3180