I'd like to see a form of "partitioning" added to Python, with three successive stages:
- Safe threads. Only immutable (or otherwise thread-safe) objects can be shared between threads. No longer a need to define a "memory model" (unless CPython and Java.)
- Dynamic code seclusion. Modules loaded at runtime prevented from affecting statically loaded code, thus ensuring a compiler can always perform intense optimizations.
- Untrusted code jailing. Prevent direct access to the OS or filesystem, as well as limiting memory and CPU usage.
Each stage would add a significant application domain:
- SMP. Threads can safely and easily run on multiple CPUs, or even on a cluster of CPUs
- Optimizing compilers performing global analysis. Mathematical applications, 3D graphics. Kernels anyone?
- Webbrowser applets, extra layer to trusted code security. Alternative to hardware address spaces?
One note, I believe sane finalization requires the first stage (safe threads), and since Python (or at least PyPy) requires finalization, it in turn requires safe threads.
No comments:
Post a Comment