News for hackers. Stuff that matters.
Re:Most used words in programming languages by macygray on Friday January 20, 2017 @09:20AM (#13443892)
Cool stats about Java. "import" is the most frequently used word. It looks like everything is already exist in Java, so just import all the things, some clue code and you are done.
Re:Most used words in programming languages by gravypod on Friday January 20, 2017 @09:23AM (#13443914)
Then why isn't this the case for python. It's as equally as kitchen sink, right?
Re:Most used words in programming languages by the_duke on Friday January 20, 2017 @09:27AM (#13443942)
Java doesn't have syntax for importing more than one member of a package in one statement.

Either you import a single member, or all with *.

Combine that with IDEs that auto-create the import statement, and there you go.

Re:Most used words in programming languages by the_duke on Friday January 20, 2017 @05:07PM (#13447360)
I just remembered: also, each class in Java has to be in it's separate file. That might very well be the biggest factor.
Re:Most used words in programming languages by masklinn on Friday January 20, 2017 @10:20AM (#13444384)
In Python you usually import a module and use that as a symbol, or `from module import Symbol1, Symbol2, Symbol3`.

Java doesn't have the former, and the latter requires an import per symbol (it also has the ability to import every symbol in a namespace, and so does Python, but that's usually discouraged)

Re:Most used words in programming languages by sleepychu on Friday January 20, 2017 @09:28AM (#13443949)
I think if you grouped the import statements by package the numbers would be similar but typically people import individual classes.