> if there isn't, first swap out any objects from memory to disk
Use `pickle` to serialize your objects, use advanced meta-programming to create proxies for the serialized objects which you can then use (store in dicts, list, pass to functions, etc.) which defer loading from disk until needed again in the future. Remember to initiate gc cleanup after you're done dumping things to disk.
> starting with the ones that had been used the longest time ago
Store access time on objects, sort by that time when serializing.
> and after the function has finished running, swap those back into memory.
Touch every proxy object so that it reads and unpickles the object it replaced earlier.
--
So, let me repeat: every existing language lets you do all of that and more. The amount of work needed to make all these differs by language, of course, but you can do all that if you want, in any language you choose.
I don't know what you're thinking. Given that the above is obvious to any competent programmer, could it be that you're a simple troll?
I further gave you an extremely difficult functionality, which I phrased as " 'analzye this library and include a logically simplified version that only needs to address these cases:' (a list of conditions.)". You ignored this.
This is obviously not functionality any language includes. It is not easy or anything like that.
If you don't like my examples, you can come up with your own. Pick something hard that programming languages don't do.
You are correct that most programming languages have most of the same functionality, and differ only in their syntax: this was my point. For this reason there are transpilers (source to source compilers) which output a different language.
If you don't like my examples, pick your own. Anyway in this comment I have already quoted myself saying such an example, which you ignored.
My overall point is that most languages don't strive for such features. They most markedly just differ in syntax. You confirmed this at the top of your comment.
Thanks for your additional thought, and please remember to be civil.
Every single language out there is capable of doing all these things. Like, even Python fits the bill:
> Whenever this function is called
Use decorators to add pre and post processing to any function.
> make sure there is enough free memory (at least ---- MB)
Call out appropriate OS function (http://stackoverflow.com/questions/2513505/how-to-get-availa...) via ctypes. Or use Python's own `gc` module, if you're only interested in your process' memory.
> if there isn't, first swap out any objects from memory to disk
Use `pickle` to serialize your objects, use advanced meta-programming to create proxies for the serialized objects which you can then use (store in dicts, list, pass to functions, etc.) which defer loading from disk until needed again in the future. Remember to initiate gc cleanup after you're done dumping things to disk.
> starting with the ones that had been used the longest time ago
Store access time on objects, sort by that time when serializing.
> and after the function has finished running, swap those back into memory.
Touch every proxy object so that it reads and unpickles the object it replaced earlier.
--
So, let me repeat: every existing language lets you do all of that and more. The amount of work needed to make all these differs by language, of course, but you can do all that if you want, in any language you choose.
I don't know what you're thinking. Given that the above is obvious to any competent programmer, could it be that you're a simple troll?