|
|
|
|
|
by rmrfrmrf
4538 days ago
|
|
Having learned C and C++ before even touching Java, "public static void main(String [] args)" arbitrarily shoved inside a class is still an aspect of the Java that absolutely annoys the crap out of me. Before you even print "Hello world" to the screen, you're exposed to an obscene amount of opinionated design (classes! classes everywhere!). Given a competent instructor, students should learn to "break out of main()" as quickly as possible. However, the class where I actually learned Java formally had an adjunct professor who would put EVERYTHING into one class so that students wouldn't have to learn about code organization so early (IMO a huge mistake). All of that aside, I find it amazingly stupid that a best practice for Java has you creating a specific class like MyCoolAppRunner with only one MAGIC function whose only job is to load ANOTHER class to handle the actual app. IMO C and C++ get it right by having main() exist in the ether by itself -- it indirectly abstracts the stack and heap in a way that makes MUCH more sense than the way Java handles things. |
|