Drawbacks of Python:
– A major drawback of both Python and Java is that they are memory intensive. Even though both Java and Python languages have multiple implementations, C++ remains the most popular choice for embedded systems programming, which means it will be harder to find someone who can program in Python or Java than it would be to find someone who knows how to program in C++.
– While some code written in either language can run on any platform due to their use of bytecode or virtual machines, there are some differences between how different platforms interpret the instructions. For example, even though Java has an added step of compiling before actually running a specific line of code, this process ensures that your program will run strictly as intended no matter what operating systems you’re using (since every single machine uses its own instruction set). Unfortunately, this isn’t the case with Python since there are different versions of the language that interpret code in different ways (for example, there’s one version of Python for Windows and another for Linux), which means the code written could perform differently depending on what OS it is run through.
– Because of how strict Java is about types, there are no issues with the language recognizing who and what something is (for example, you can quickly tell whether or not a variable contains an integer or floating-point number). While this makes storing data easier and much more accurate, it also goes through much more processing to accomplish this kind of feat. On the other hand, Python does allow for variables to hold an object of multiple different types within them, which may make it harder to go back and change something that needs to be updated since you would have no idea as to what’s stored in each piece of data unless the context was provided. Furthermore, even though all objects in Python are handled by reference so they can all use up memory without needing to be allocated, the lack of strict type enforcement will make for a much larger footprint on your computer’s working set memory (where data is stored in RAM).
– Java has more documentation available with better explanations, while Python programs have a lot of information that can be easily found through a quick Google search. Because both languages have their benefits and drawbacks, it all comes down to personal preference when looking for which language to use. While one language may provide a solution that another cannot, this doesn’t mean the opposite language would not have accomplished what was needed if used correctly. In short, don’t simply assume one language is better than the other because ultimately, it all comes down to how someone speaks them.
Drawbacks of Java:
– Java is slower than C++ due to its use of a Java virtual machine. Because of how many instructions there are that go into creating an application, running it the first time takes longer than when using C++ (which is compilable directly to machine code).
– Another issue with Java is that it has no “one true IDE.” While it does not look like a big deal, it can cause significant problems if you’re working on a team and half the group prefers one type of editor while others want something different. For example, Eclipse, IntelliJ IDEA, Netbeans, etc., all have their advantages but aren’t compatible with each other, which means switching from one to another will take up time during the software development process. This is the critical reason why game developers using Java tend to stick with IntelliJ (even though it’s not open source like Eclipse, which makes it hard to customize).
– Last but certainly not least, typing everything out in full can become very tedious when writing code due to how verbose Java is. Because of this, many people working on a project with others will use shortcuts or abbreviations (this isn’t typically an issue if you’re only working alone since there will be no need for anything else). For example, in Visual Studio, I can type “soon sem.” and hit the tab twice after the colon to close up an if..else statement without me to look back at my work to make sure it matches the original. However, if I were to do this in Java, I would need to type out “if (x > 0) { soon(sem); } else { sem = null; }”. Fortunately, there are shortcuts available however they can be rather difficult to memorize, so most people stick with traditional coding methods.
– Another drawback that pertains specifically to game development is due to how strict Java is about types. Because everything must be an object in Java, extra processing must occur when checking what something is. For example, you can quickly tell whether or not a variable contains either an integer or floating-point number in C++ without needing to run through all of the code to find out what it is. However, in Java, this would need to occur whenever checking whether or not something is an int or afloat due to certain types being more precise than others. This means that data that could have been stored on the stack instead of the heap will be allocated there instead due to how specific integers are treated instead of doubles (which are only accurate within seven digits of precision). This also allows for garbage collection during run-time, which can cause issues if you’re trying to predict how much memory will be available since objects are supposed to be removed shortly after they’re no longer needed.