6 ms·
A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it. I can make the same arg
by Osmose 12y ago
A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it. I can make the same argument for Python _for me_. And for my company too; we have a ton of Python developers already, so it makes sense to write things in Python if possible in case someone needs to change or improve anything.
The author also talks about how Java's verbosity is a trivial issue, and in terms of "stuff you have to type", I agree. The point isn't to save a few characters to type. To me, the problem with Java's verbosity is that it _impedes understanding_. The excessive notation required by type declarations and generics and so on are visual noise that distract from what the code is doing.
There are some valid points raised too, such as concerns about Python's scalability, but that's an argument for _choosing the right tool for the right job_, which, while mocked at the beginning of the post as a way to avoid an interview question, is still good advice. For a lot of projects, Python is fast enough to handle the expected processing, has an ecosystem with libraries that handle all of the things the project might need to do, and is portable enough to run on the platforms necessary. For some projects, it fails one of these, and another language may be a better choice. That's okay!
I think the best takeaway here is that it is sometimes useful to see if you can leverage your existing knowledge in one programming language by applying it to a task you don't normally use it for. By all means, write shell scripts in Java, maybe that's really useful! Or maybe write a GUI in Haskell! Transpile BASIC to frontend code!
(For context, I use Python for web development (both small and large sites), scripting, and a few personal projects like a music player or emulator. I did a bunch of Java in college and some internships.)
- edwinnathaniel 12y agoThough the lack of noise could also translate to parsing things in my head trying to understand what is happening in this super short code....hence it takes longer to read the code!
- lmm 12y agoMaybe, but what are the examples? "Foo f = new Foo()" takes longer to read than "f = new Foo()". An anonymous class is longer than a lambda and also less readable, as Java folk have thankfully finally realized. "public static void main" does not clarify anything. Getters and setters are the bane of my Java-reading life, because 99.9% of them are the exact same autogenerated four lines, but you still have to read them all in case one of them is different. Also, there's a huge jump in readability at the point where a method or class fits on a single screen. So if 4 lines of Java = 1 line of Brand X, but it takes me the same amount of time to read 4 lines of Java or 1 line of Brand X - that's still a win for Brand X, because it's much easier to write classes that fit on a single screen.
- Osmose 12y agoTrue! It requires some skill to write concise code that can be understood easily. I think that the required verboseness of Java makes things worse than the potential for excessively-short code does in Python, though.
- waps 12y ago> There are some valid points raised too, such as concerns about Python's scalability But if you think about the two python scalability problems : 1) speed 2) programs become unmaintainable as they grow way quicker than they do in java and the like Nobody's arguing to write shell-scripts in Java. Why are people arguing writing websites that will include more than a trivial amount of functionality in anything but Java ?
- Osmose 12y ago(1) isn't really something that's terribly arguable one way or another (In my experience Python is plenty fast for most tasks, but my tasks differ from your tasks). I question (2) though. Why do you think that a Python program will become unmaintainable faster than a Java program? Is it type errors? Or maybe you think it's difficult to figure out what values are expected in a given variable? Or is it something else?
- frostmatthew 12y ago> A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it. Far more of the article is spent on arguments that are valid for any compiled statically-typed language. So much so that he feels the need to point out why Java [as opposed to C#, C++, D, Go] in the penultimate paragraph.