Brendan wrote:As far as learning goes; old managed languages (e.g.
Pascal and its P-code, Lisp) are much easier to learn than newer managed languages (Java, C#, both with massive libraries); and old unmanaged languages (C) are much easier to learn than newer unmanaged languages (C++). It would be foolish to compare an old managed language to a new unmanaged language and decide that "managed" is easier to learn, and equally foolish to compare an old unmanaged language to a new managed language and decide that "unmanaged" is easier to learn.
For a developer to be productive it is a requirement to use a lot libraries. So, with some simple language like Pascal a developer needs to learn libraries. Next requirement is OS-specific knowledge. Again a developer should learn about new OS. Next requirement is toolchain knowledge. Again the developer should learn. And this learning process is repeated for every OS/hardware/toolchain/language/set of libraries. All this represents an environment, where developer works. In case of managed environment there is a need to learn just one environment. In case of unmanaged languages - developer needs to learn every environment he is required to support code for.
So, if we speak about managed/unmanaged, then it is the environments, that we should consider, but not only languages. And if we compare learning time for one environment (managed) and many environments (case for unmanaged languages) then it is obvious that many is more than one, that's why it is harder to learn.
Brendan wrote:For things like whether or not a process is allowed to use networking, which files it can access, if there's disk or memory quotas, whether it can fork/spawn child processes, who it can communicate with, etc; all of those things are built into the OS and/or kernel, have nothing to do with the process itself, and have nothing to do with "managed vs. unmanaged".
Here again we have to learn new knowledge for every OS. Next we should write at least new scripts for every OS. And every OS required an administrator with new skills. Now consider a managed OS, which delivers the same set of feature on any platform, supports just one set of scripts or whatever applications are required for it's management, requires an administrator with just one set of skills. And of course, it requires just one set of skills from developers. What variant costs more?
And there is another problem. An OS specific administrative options are general enough to be useless for some special cases. That's why it is easier to write an application server, that is designed with a specific goal of running specific applications, and implement all the flexibility we need in this one server instead of writing some flexibility extensions for every OS. And you can see the success of such approach in Java application server market.
And all this is possible because of managed environment which requires just one set of skills and knowledges.
Brendan wrote:Complaining that a managed environment doesn't whine about things that are perfectly valid for the language it's designed for is silly.
My complaints are about the whole type of bugs, that managed environment can exclude from programmer's life and unmanaged languages can't. Just because it is the responsibility of some environment to handle errors of such type (would it be standalone or embedded in every compiled program).
Brendan wrote:What exactly would be the difference between a managed OS that allows code to run either in a managed environment or an "unmanaged but with hardware provided isolation" environment, and a normal OS that allows code to run in either a "unmanaged but with hardware provided isolation" or a managed environment?
The difference is in developer's approach to the application development. Managed environment requires one and only one input for it to manage. Unmanaged OS allows input in any form (scripts, exes, plain binaries). So, the developer expects that if he writes code in a native form (unmanaged), then there will be better performance. But in fact developer looses all the benefits of managed environment while hoping for better performance. And it is the managed environment, that makes managed code useful on an unmanaged OS. It means that it is not the unmanaged OS, that provides developers with the managed option, but it is in fact managed environment developers. When some OS runs an application it just doesn't care about is it managed or not, but when managed OS runs application it cares a lot about the choice of a way the program can be executed. So, unmanaged OS provides nothing for a managed environment developer, while managed OS provides an option of dangerous execution with better performance (just like unmanaged OS, but with additional and useful safety checks and notifications).