First, the two languages are created in completely different contexts and for different purposes. Java was created as a simple alternative to C ++. C ++ was very expensive for developers in those days, and it was very difficult for newcomers to learn advanced topics of C ++ (especially pointers and memory management), and error handling in C ++ was like a nightmare.
Java was born to rescue everyone from such a situation. At first it eliminated the pointer concept, almost completely automated memory management, and introduced many advanced and easy error handling features. At the urging of the cross-platform, its entire activities are integrated into a virtual ecosystem, JVM.
Interestingly, its syntax, which you think is difficult, became even more simple and user-friendly in those days. Although Java's syntax is high, none of it fails, every extra line or keyword teaches you to think like a computer.
Python, on the other hand, gives the user more control, which can be either an advantage or a disadvantage depending on the type of use. Although Python's simple syntax makes it easy to use in everyday work, its simplicity may not be maintained as the scope of the project grows.
As I said before, Python is just easy to see. Its working process but not as straightforward as the syntax. Python code is first converted to independent bytecode, but in this case it is not functional ... only if it is interpreted in CPython (which is written in C) can it reach the machine level as an instruction.
No one preferred short syntax when creating Java, its main goal was versatility. Basically Java takes a less declarative and more imperative approach than Python for cross-platforming convenience.
Many find Java difficult Because it's very straightforward, if you want to write a Java program, you have to write at least 10 lines of code and do an import library. One function call is enough to write a Hello World in Python. But what new developers ignore is "performance". A complex program written in Java works faster than Python. Because, the main obstacle in the way of Python's performance is this simple syntax. In other words, this is a dynamic datatype. When writing code in Python, you don't have to say it's an integer and it's a string. Python interprets dynamically while typing. Due to the effect on performance after. The origin of CPython to overcome this problem.
Almost all of Python's popular libraries (Pandas, Nampi, Psychit Learn, etc.) are written in Cython.Once you write code in Cython, you will no longer find Java difficult.
Comments
Post a Comment