Re:Ask HN: What is the future of programming languages?
by dragonwriter on Friday March 01, 2013 @05:39PM
(#5307426)
It doesn't seem to be about time, you seem (by a conservative interpretation) to want to be able to access a the context from which a function was called from within the function: some languages allow you to do that nowm though quite often, even those in which it is possible don't have a direct and convenient mechanism in the language core or standard libraries, though the mechanism is implementable in the language, as in Ruby where Binding.of_caller doesn't exist, but can be implemented (http://extensions.rubyforge.org/rdoc/classes/Binding.html.)
Perhaps you want even more access to environments elsewhere in the call stack; ISTR that there are languages now that allow that.
Of course, doing stuff like that makes it much harder to reason about your programs than treating functions as sealed boxes that communicate via arguments and return values, which is one (but not the only!) reason why most languages deliberately don't make it easy to do.
Perhaps you want even more access to environments elsewhere in the call stack; ISTR that there are languages now that allow that.
Of course, doing stuff like that makes it much harder to reason about your programs than treating functions as sealed boxes that communicate via arguments and return values, which is one (but not the only!) reason why most languages deliberately don't make it easy to do.