In this section I have brief describe the difference between the python and other programming language. This comparison is based on language issue; practically the choice of language is depend on other real fact e.g. Cost, training, availability, even emotional attachment.
Programming language classified in three ways,Low level: This type of language is directly access the memory and hardware, the language come Under this category are Assembly, C, C++. These are requiring more detail orientation.
Manage: This category include Java, C# they featured that you scarifies for your need like memory management, organization, because they are not directly access the hardware and memory the problem of platform dependency is resolve. But these tools high configure machine because while your application running these tool also load.
Interpreted: This include Python, JavaScript, Html 5 with large library as your need and it provides Powerful feature tools such as web browser and string manipulation libraries. It require very less organization and organization skills.
Python Vs C/C++
Although C language has its own standers but still there are some points which attract you to go with python. There is much deference between these languages but I concentrate only on important one. Python code is very short and easy to understand as compare to C language. Python supports object oriented programming paradigm while C supports procedural oriented paradigm. Python has no type declaration which is mandatory in C. Python does not support pointer. Python provide automatic memory management. Major deference is C/C++ are platform dependent for move code to another place you have to keep code with you and re-link the code to generate the byte code but python is platform independent.
Python Vs Java
Java python are both popular programming languages. Java supports only object oriented
programming pattern but in python you can mix both object oriented and procedural
oriented pattern. As java is based on object oriented programming its sense you
cannot write code without declaration of class, there is need to invoke compiler
to compile the code, in python no need to declare type of any variable and you can
directly run the program. Java runs faster as compare to python but python take
less time to develop. The major deference is python is dynamic type language, java
is statically type i.e. has character sets. Because of run time typing python’s
run time works hard e.g. perform some mathematical operation like addition, subtraction
it first find the data type which is not available at compile time and then perform
operation which is the overload on user define type. Python is used white space
for function, class declaration, java uses curly brasses to start and end the any
class or function declaration. E.g.
Python Syntax
Class myclass:
def myfunction():
//function definition
def myfunction1():
//definition
Class myexample:
def myfunction():
//function definition
def myfunction1():
//definition
Java Syntax
Class myclass
{
Void function()
{
}
}
Python Vs C#
As similar to java C# also statically type and object oriented programming language and python is dynamic language support both object oriented and functional paradigm. C# support for window cross platform only but python support Linux also. You can write your python compiler using C#. In python you can use your own tag because everything is dynamic it is useful as many cases, you can achieve similar in c# by dependency injection, week reference, extension method but it is very complex. Python provides easy and flexible decorator as compare to c#. *args, **kwargs - most of static languages don't provide such a way to enumerate/pass call arguments. On the other hand, there are lots of ways to process all arguments in C#. Yield expression is accepting and returns value in python but in c# it can accept only. “With” contexts in Python can process exceptions: __exit__ method there gets information about thrown exception. This is impossible in C#: IDisposable.Dispose () have no such arguments. The feature can be really useful in some cases - e.g. when you need to make a commit/rollback decision inside block exit code. But you can handle this with nearly the same amount of delegate-based code in C#: dbContext.Transaction(() => { /* code */ }. Method overloading is something natural for static languages, but quite unnatural for dynamic ones.
Note: - While unit/system testing of project is must, Selection of programming language is depending on developer comfortless and requirement of the project like time and cost. Other fact also there that we should not avoid is that statically typing is reduce stupid bugs related to type.
You can also suggest any improvement of this and future blogs.
No comments:
Post a Comment