Hacker News new | ask | show | jobs
by AgentME 1482 days ago
Javascript does this: functions have to toString() method which returns their source code. Python also does something like this. Though it's just a debugging tool; you can't do much practical with it in real applications (like edit it and instantiate a new function from it) because it doesn't include the closure the function was defined in.