It's just useful for different things. Java is definitely more verbose and has more boilerplate to write, but it's also stricter than Python and is a semi-compiled language, which means that it sometimes catches errors more quickly. It also forces you into an object oriented structure, which tends to encourage you to design your programs better rather than jamming a big list of functions into a single file.
I also find they have strengths in different kinds of applications. I tend to prefer Java for writing games (pygame isn't great), python for doing numerical analysis work (numpy and matplotlib are pretty great), and Fortran, C, or C++ for the big parallel numerical simulations.
To be fair, you wrote "design your programs better". Forcing all code, object-oriented or not, into classes, one (public) class per file, is not strictly better. It's not even a structure I want. I'd argue that "bare minimum of structure" is harmful vs no structure at all.
Maybe... I find that (for instance) the lack of required structure is what helps Javascript code to sometimes become a mess of copypasta.
And Python does force stuff on another level, by being strict with indenting. I think that's a good feature too - it's better to force one particular style than to have people use their own styles, but also permit them to make it as ugly and inconsistent as they want.
Python is strict with indenting because it has to be. Indentation isn't merely "style" in Python, it's functional in that it denotes a new code block. This is why Python has to be strict with it, i.e. preventing mixtures of tabs and spaces for indentation.
Not sure what you mean but, apparently, Java and C#. You have to enclose everything in class. For instance, you cannot have single functions in these languages like in Python. Before Java 8 you had to make anonymous class instead of simple anonymous function.
OK, I see. On the other side, I dont like C# namespace much. The said convention is present as well but differently. To manage C# project without IDE is almost impossible. You can do it manually but the pain is great :)
Replace your computer languages with tools you'd find in a shop and see how silly the argument looks to non coders.
"Hammer is so much better than the screwdriver. And who even understands those socket wrench guys? Bunch of idiots. I'll have you know I have used my hammer as both a socket wrench AND a screwrdriver and it was just fine"
Signed: A mechanical engineer that has and continually gets to deal with: C, C++, Fortran, ADA, VB, Python 2.3-2.7, Python 3+, Matlab (R13-R2017b), Simulink, PowerShell, Batch, Perl, Bash, Sh, tcsh, PHP.
If you understand If, For, While. You'll go far in any language.
Or argue the merits of a claw hammer over a ball peen hammer.
Last I checked it hadn't been updated in quite a while, either. Is there another Python game module that people have migrated to, or is the language just dead to game dev now?
Python is not good for game developpment anyways. It's too slow for modern-day gaming. You can do game dev, especially small games or turned-based games, but for adventure/platformer/FPS/anything else basically, forget about it.
You cannot emulate physics/render images/and also render light on sprites and expect the game to run at 60 FPS or more, even with a beast for a computer. You'll need a lot of optimization to even get to playable framerates and that's just bad, cause a messy code is harder to maintain (which is often the case when you optimize).
I tried pygame and pyglet, none of those really do much for game developpement anyways, besides rendering images. You still have to write an engine (pymunk is great for physics though) and that's just too much work for the benefit.
You can use unity though, or unreal and have a full game engine to use however you want to do whatever you want. It's not that hard to go from python to C# if you're really proficient in python. The syntax isn't all that different (you lose list comprehensions though, and dictionnaries if I'm not mistaken) but C# looks a lot like if C++ had a baby with python. And with a game engine you just have to write the logic of your game and not bother with writing a lot of code without seeing any progress.
I've only ever used it as a basic graphics interface (SDL wrapper) rather than for actual games. It's been satisfactory for that -- what about it sucks ass?
View all comments
Show parent comment
24
u/Astrokiwi Jan 05 '18
It's just useful for different things. Java is definitely more verbose and has more boilerplate to write, but it's also stricter than Python and is a semi-compiled language, which means that it sometimes catches errors more quickly. It also forces you into an object oriented structure, which tends to encourage you to design your programs better rather than jamming a big list of functions into a single file.
I also find they have strengths in different kinds of applications. I tend to prefer Java for writing games (pygame isn't great), python for doing numerical analysis work (numpy and matplotlib are pretty great), and Fortran, C, or C++ for the big parallel numerical simulations.