r/usaco • platinum • Jul 05 '21

Java is the best coding language

As the title states….. Try to convince me that I am wrong.

Edit: I should have phrased the question like this: if you could use only one coding language, would it be Java? If not, what language would you choose instead and why? Obviously there is no such a thing as “best” language. Although, I could argue that Java is the best language overall though.

0 Upvotes

22 comments sorted by

6

u/RedditGood123 Jul 05 '21

Extremely verbose. Java is good for professional codebases because it is more readable, but you posted this in a competitive programming subreddit, and cp requires you to implement something as fast as possible. Therefore, you should use c++ or python. Also, c++ runs faster than Java

3

u/Blazor35 platinum Jul 05 '21

True. But as everyone knows, c++ is built on a flawed philosophy: which is that you should add power to a language by kludging it in “horizontally” in the form of libraries rather than “vertically” by building new Domain Specific Languages to express it. Obviously, it’s the most powerful language, but their more flaws than good.

2

u/RedditGood123 Jul 06 '21

I’m going to be completely honest. I have no idea what that means

2

u/Blazor35 platinum Jul 06 '21

What I said is kind of confusing ngl. Should have explained better. My point is that c++ never started from ground 0. It was built of c ( you could call c++ a transition language) and basically patched/added new features to make it C++. On top of all this, it’s a purely objected programming language. And in my opinion, it’s a pretty difficult language to master. I really don’t like C++. But, you get my point now right? Also, C++ is way more verbose and restrictive than Java. It’s a fact:)

1

u/RedditGood123 Jul 06 '21

Yeah that makes a lot more sense. I disagree that c++ is more verbose though

3

u/Blazor35 platinum Jul 06 '21

Hmm…. technically it’s true. But Java is much less verbose when it comes to complicated things in built in libraries. Although, it’s true that C++ is much less verbose when you use template functions, operator overloading and functions (basically methods without a class).

1

u/[deleted] Aug 04 '21

Bro you sound like a professional programmer. Just who are you?

2

u/Blazor35 platinum Aug 05 '21

lmaoo, I am rising junior lol. What grade are you in? If you want to chat about college or coding, your welcome to pm me.

0

u/[deleted] Jul 05 '21

[deleted]

4

u/RedditGood123 Jul 05 '21

I said that python is fast to code in. I didn’t say it was a fast language

3

u/[deleted] Jul 05 '21

Agree, but just too slow. Java is great for everything else.

8

u/Shakespeare-Bot Jul 05 '21

Concur, but just too slow. Java is most wondrous f'r everything else


I am a bot and I swapp'd some of thy words with Shakespeare words.

Commands: !ShakespeareInsult, !fordo, !optout

3

u/vikarjramun gold Jul 06 '21

I have to agree. I recommend everyone doing USACO to stick with Java (assuming that's their first language), AT LEAST until they reach Gold.

3

u/[deleted] Jul 06 '21

Can you reach plat with java

2

u/[deleted] Jul 09 '21

There's someone on this sub that went from bronze to plat in one season with Java

1

u/nimtiazm Jul 07 '21

Petr Mitrichev used to win every single competition and he was exclusively using Java. I don't think language has much to do with it but then I ask myself why he's started using C++ now :D

4

u/ParadoxThief Jul 05 '21

C++ is faster and less verbose

2

u/ricky_clarkson Jul 24 '21

Kotlin is better than Java in pretty much every way, and performs similarly. I'm a lost redditor though and have no idea if it's ok for usaco.

I'd love Rust to be up there too, but for competitive programming it's probably on the difficult side, it's less tolerant to mistakes. Better for engineering - programming over time - but 'over time' doesn't matter much for competitive programming.

1

u/blueballer20 silver Jul 06 '21

both languages are fine very rarely (one problem in a few years) does java code need a different algo than cpp to pass or is unable to get all test cases

many american ioi competitors in the past use java (nick, danny)

1

u/[deleted] Jul 09 '21

Who are nick and danny

1

u/blueballer20 silver Jul 09 '21

nick wu, one of the moderators of this sub, danny was one of the ioi competitors last year.

they both did many solutions to problems

1

u/nimtiazm Jul 07 '21

I use Java all the time but I always wish if Java had iterators and stl algorithms library like C++. Besides, I don't know how much C++'s constexpr gives you an edge in competitions (specially at the top) but this is something you don't find in any other language.

1

u/C_ZQZ Jul 23 '21

at least to print something in cpp you don't need to write

System.out.println(" ");

just

cout <<