I know nothing about real programming, and I came across this in a discussion with a friend.
Messages are the lifeblood of systems, how would you go about implementing a self-transforming message?
o = {
a : 123,
dna: function(a){
o.b = 'cxa';
return t(a,b)
}
There's nothing safe about the idea of evaluating code being sent over the wire.
Regardless, what do you think?
Well, there's JSONP, which does something like what you envision (remote execution of an included function acting on sent data and remote state). It's regarded for that same reason as an annoying thing to keep an eye on from a security perspective.
Also, browsers will run whatever appears between <script>
tags when they load a page on most people's systems, which can transform that page itself (this is how trendy "single-page" apps work: they actually create a sort of "puppet theater" out of a single HTML element they attach to).
Finally, there are quines, which are programs that print their own source, named after W.V. Quine. There are sequential quines, that print the source of another program, that prints the source of another program, that prints the source of another program...that may eventually print the source of the original program after some number of runs, if so designed.
There are polymorphic and metamorphic viruses, which refers to how the viruses transform themselves after deployment to a target machine.
Recall that biological systems are, almost by the characteristic you describe, unstable in the systems sense. That makes them poor media for a reliable design from an engineering perspective, which is why you don't see this more often.
eval
function.dput
etc.)