Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Python a Managed Code language?

Tags:

python

c#

I am being NOOBish here but i am very much interested about managed code due to The Heartbleed Bug.

I recently read this statement in HN which says:

C and other languages without memory checks are unsuitable for writing secure code. Plainly unsuitable. They need to be restricted to writing a small core system, preferably small enough that it can be checked using formal (proof-based) methods, and all the rest, including all application logic, should be written using managed code (such as C#, Java, or whatever - I have no preference).

So is Python a Managed Code Language or is managed code just a Microsoft terminology?

like image 470
ajknzhol Avatar asked Apr 09 '14 04:04

ajknzhol


People also ask

What type of language is Python?

Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. It supports multiple programming paradigms beyond object-oriented programming, such as procedural and functional programming.

What is a managed programming language?

A managed programming language is a language. That needs to be closely managed by the project manager. Whose structure can easily be managed by a developer. That is executed in a virtual machine. That has been managed to the full by its creators and that is powerful and accurate.

Is Java a managed language?

Java, Visual Basic and . NET are examples of managed code. The runtime environment provides the general library of software routines that the program uses and typically performs memory management.

Is C++ unmanaged code?

All code compiled by traditional C/C++ compilers are Unmanaged Code.


2 Answers

I would consider Python to be managed because it runs in a virtual environment that performs all memory management for you, does not allow pointers, does array bounds checking, and so on.

It is not managed in that it runs in the CLR (unless you're using IronPython), but it is managed nonetheless.

like image 196
Gabe Avatar answered Sep 24 '22 02:09

Gabe


I'm posting this since I can't comment, but Palak.Maheria's comment that Python is unmanaged code should be incorrect. Python is indeed managed.. You are unable to run managed code without an intermediary. Now, it is difficult to specifically define what is an intermediary, but assuming if you're called Tom. You develop a programming language and compiler called Tom. Now, in order for windows to understand Tom's programming language, you need this intermediary.

For instance on windows you can directly run batch files and native C/C++ applications. In the case of python, windows doesn't recognize it. Thus, you'll need to install and use the python interpreter and your python application will run on an "python virtual environment". This concept is exactly similar to Java and .NET where you need the JVM and CLR respectively. In this case, the python enviroment isn't called CLR, but it's considered managed.

As the term suggests, managed means someone/something is managing something for you. It doesn't matter what is being managed, it's the concept that matters.

Please correct me if I am wrong.

like image 25
transcend3nt Avatar answered Sep 21 '22 02:09

transcend3nt