From a legal point of view, ALL smarts contracts do actually fall under the definition of a legal agreement. They constitutes agreement with a peculiar form of enforcement.
Think about it, when you lose ETH because your smart contract failed, don't you are tempted to call your lawyer and ask for damages? It proves that smart contracts triggers legal considerations, so it apply least subsidiary. Note: Most of the Court, worldwide already considers cryptocurrencies as being "values" equivalent to money.
Further, we can see that the purpose of the law, as for the code, is to regulate the architecture of behaviors. Both contain social consequences that will be taken into account by the law. As smart contracts are part of our social behavior they fall fully under a legal scope.
The difference now, is that code is universal when law is national and implement the cultural view of specific people in a specific part of the world and regarding a specific issues. As a consequence, the diversity of laws might triggers diversity of coding requirements. To draw a parallel, we can see this cultural diversity with regards to the discussion of google's privacy requirements: Google, won't treats your data the same in France than in the U.S. since the two legal regimes differs.
I believe it is a matter of time before regulation effectively apply to code. In reality, the MifiD 2 regulation in the EU (Financial Markets' regulation) already set some conditions regarding algorithms. For instance, it states that algorithms must be compliant with some principle of the law.
In consequence, smart contrats will not escape regulation. The important thing is to create, as early as possible a set, of best practice and get a global overview of what is legally needed in order to develop "healthy contracts". Otherwise, regulators might be tempted to take some radical measures and high requirements that would kill the smart contracts adventure.