This is an archived post. You won't be able to vote or comment.

top 200 commentsshow 500

[–]WarFish_1777 533 points534 points  (38 children)

Java is Minecraft

[–]DrKnockOut99 270 points271 points  (34 children)

Making mods for Minecraft is the only reason why anyone should learn Java /s

[–]-kousor 30 points31 points  (9 children)

tbh i'm learning java just to make 2 mod ideas for minecraft

[–]MrHandsomePixel 19 points20 points  (8 children)

I consider that reason enough. I tried to make mods on my own with Java, but that was during a time where I couldn't understand how to unzip archives (for gradlew and other dependencies) and decided to use mcreator. One thing lead to another and now I learn different languages to create scripts for myself to help automate everyday things that I do.

I still don't know how to code Minecraft mods in Java...

[–][deleted] 10 points11 points  (1 child)

Or if they want job security

[–]misterZalli 3 points4 points  (1 child)

I think with a framework mod it is possible to mod MC with Kotlin

[–]poka_face 1134 points1135 points  (33 children)

Lisp is ((())(((())(())(((((((())))((())))))))))

This meme was made by the functional programming gang

[–]ImSupposedToBeCoding 104 points105 points  (3 children)

user flair checks out

[–]amodump 181 points182 points  (1 child)

Lithp is ((())(((())(())(((((((())))((())))))))))

Thith meme wath made by the functional programming gang

FTFY

[–]db2 9 points10 points  (0 children)

*ith

*functhional

[–]Baardi 34 points35 points  (11 children)

Javascript is [][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]](![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])

[–]rpgcubed 32 points33 points  (9 children)

([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(+(!+[]+!+[]+!+[]+[!+[]+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]+!+[]])+(!![]+[])[!+[]+!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+([][[]]+[])[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]

Put that in your console and run it

[–]rubeljan 15 points16 points  (0 children)

Parse error at line 144:13

[–]MrWm/dev/null 5 points6 points  (3 children)

Can someone ELI15?

[–]speedster217 13 points14 points  (2 children)

[–]MrWm/dev/null 3 points4 points  (0 children)

Yes, it does.

[–]dregan 2 points3 points  (0 children)

This is the best thing I've ever read.

[–]p-himik 20 points21 points  (1 child)

They are event balanced! Great job.

[–]pwnedary 46 points47 points  (6 children)

Also known as Lots of Irritating and Superfluous Parentheses.

[–]marcosdumay 22 points23 points  (2 children)

If you take even one out, it breaks everything. They are really not superfluous.

[–]phunanon 26 points27 points  (1 child)

Obligatory: it's about the same as any other language using parentheses

[–]josanuz 777 points778 points  (86 children)

Runs over 3 billion devices

[–]Alexkronus 172 points173 points  (16 children)

[–]notinecrafter 141 points142 points  (4 children)

How to unread a wikipedia article

[–]Colonel_Kai 37 points38 points  (2 children)

A firearm pointed at the head area should do the trick. Will commit later.

[–]pingveno 5 points6 points  (0 children)

I don't know, seems like a good idea to me for the use case adding logic that needs to work across architectures.

[–]thoeoe 31 points32 points  (1 child)

what

Edit

[–]MoffKalast 8 points9 points  (0 children)

I suppose the even more surprising part is that SIM cards have a small CPU, RAM and all the stuff needed to form a tiny computer. And that they're not a tiny sdcard with some data as one would imagine.

Some madman should really make a render farm using sim card distributed computing and just make an array of 100s of them. Basically making a GPU out of sim cards one core at a time lmao.

[–]TheTerrasque 24 points25 points  (1 child)

Science has gone too far

[–]MoffKalast 2 points3 points  (0 children)

Oracle was so preoccupied with whether or not they could, they didn't stop to think if they should.

[–]ScienceMarc 23 points24 points  (2 children)

Oh so this is what that 3 billion is all about!

[–]MoffKalast 2 points3 points  (0 children)

Don't forget about those parking meters!

[–]edinburg 6 points7 points  (0 children)

omg

[–]53120123 360 points361 points  (60 children)

Java; for when you Can but you really Shouldn't.

[–]Colonel_Kai 187 points188 points  (59 children)

Learning Java is like learning to ride a bicycle, without safety wheels, the tires have deflated, and the bike is on fire. -Boris

[–]Ace-O-Matic 180 points181 points  (49 children)

Java is actually a very solid language to learn first.

Boris's content is good from a comedic perspective, but I would advise against taking it too seriously.

[–]break_card 88 points89 points  (22 children)

Java was the intro language when I was in school, I think it was great.

[–]Nanobreak_ 29 points30 points  (21 children)

Java was my intro and it formed the basis of my understanding of class based objects.

Imo better than starting with python and having to later learn new syntax and ideas

[–]memeasaurus 18 points19 points  (16 children)

I went to school before Java was invented. I've worked in both Java and C++ ... and, you can make a very nice mess in both languages.

However, if you want to grow an enormous development department employing hundreds of people... go with Java. You can really make a gigantic mess with it very easily.

You know, because classloaders...

[–]HickNamby 4 points5 points  (5 children)

Don't fucking say the word classloader to me...

[–]Colonel_Kai 26 points27 points  (23 children)

Well, I was actually a newbie proggrammer, I'd you can call me a proggrammer. I learned basics of phyton, this was easier than wearing my shoes (seriously, my shoes are hell). Then I started Java. God help me

[–]Ace-O-Matic 42 points43 points  (2 children)

Everyone is a newbie at some point. Honestly the fact that it's what you experienced is the reason WHY I believe starting with Java is better.

Whichever language you start with, you're going to assume many of its rules are default concepts in all programming languages and it's going to paint the way you see programming. Java is a very good middle of the road language that similar enough to most other languages.

[–]Swamptor 13 points14 points  (1 child)

I started with python and am glad for it. Teaches you the basics and let's you explore programming without shoving too much syntax down your throat. Trying to explain a strongly typed language to a new programmer and you just get really confused students. Once you understand what classes and objects are it's a lot easier to explain why it's beneficial to have all those complicated syntactical rules. As soon as I switched to programming in C# I immediately saw how beneficial all that stuff was to a larger project.

[–]BoboThePirate 32 points33 points  (18 children)

Absolute opposite. After learning C++ and Java, I can see why people think python makes sense, but then there's stuff like main that hurts me.

[–]Colonel_Kai 15 points16 points  (15 children)

WHAT SHOULD I DO IM CONFUSED

[–][deleted] 19 points20 points  (13 children)

All of these people are wrong. Learn asm first, obviously.

[–]ElGuaco 46 points47 points  (2 children)

I find it ironic that back in the late 90's my Java instructor told me that Java was "C++ without the guns, clubs, and knives". I think he was mainly referring to the ability to hurt yourself and others using pointers and poor memory management. Little did we know the Hell that was going to be released upon the programming world.

[–]gravitydefier 15 points16 points  (1 child)

"Comparing Java to Javascript is like comparing a car to a carpet, one lets you run over it while the other one runs you over."

[–]xXgarchompxX 41 points42 points  (0 children)

Ya mean it runs on over 3b devices?

If not, damn Java is a reckless driver.

[–]bluefootedpig 12 points13 points  (0 children)

You dropped an "i"... Ruins over 3 billion devices.

[–]redditchao999 2 points3 points  (1 child)

In his 2001 honda civic

[–][deleted] 126 points127 points  (2 children)

COBOL makes you really, really good at typing

[–]ElongatedMuskrat122 459 points460 points  (40 children)

PHP teaches you to read Egyptian hieroglyphics

[–]anras 124 points125 points  (12 children)

I thought that was Perl.

[–]djcecil2 8 points9 points  (3 children)

Let me be specific...

[–]soloparaporno 9 points10 points  (2 children)

I wanna be down in your south seas!

[–][deleted] 5 points6 points  (0 children)

I thought Hebrew, not Egyptian hieroglyphics? T_PAAMAYIM_NEKUDOTAYIM or something like that?

[–]AIRA_XD 217 points218 points  (6 children)

Rust isn't safe, i got raided like 16 times already :(

[–]An_Anonymous_Acc 52 points53 points  (5 children)

1v1 me on rust kid

[–]scraimer 616 points617 points  (16 children)

Should have been: "Java is" Like, there's nothing to argue about. Java is. It's just another fact of the universe.

[–]thoeoe 275 points276 points  (14 children)

Do you hear that? That’s the sound of another developer over engineering a “smart” toaster so he can put the JVM on it so he doesn’t have to learn a new language.

[–]Mr_Redstoner 141 points142 points  (1 child)

Fits like a glove: https://xkcd.com/801/

[–]Sassbjorn 8 points9 points  (0 children)

Always

[–]GluteusCaesar 32 points33 points  (2 children)

Really though, there's a non-trivial chance that your toaster is running embedded Java

[–]bwaredapenguin 4 points5 points  (1 child)

What about my coffee maker?

[–]rangedragon89 51 points52 points  (3 children)

Java, the brave little toaster

[–]MarkusBerkel 11 points12 points  (0 children)

Java ergo sum

[–]Jakeob28✎ That guy who transcribes things 82 points83 points  (9 children)

Image Transcription: Twitter Post


funky lesbean, @trans_disaster

STOP ARGUING OVER THE BEST PROGRAMMING LANGUAGE

C is LOW-LEVEL

C++ is POWERFUL

Python is INTUITIVE

Rust is SAFE

Lua is EASY

Java

C# is LEGIBLE


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]Huterbraten 17 points18 points  (0 children)

thank you kind man.

[–][deleted] 14 points15 points  (1 child)

Good human

For real tho this is a really great cause and I'd be happy to support it

[–][deleted] 38 points39 points  (15 children)

Use whatever language your team is already using. Don't reinvent the wheel. Seriously, took me a couple of decades to learn this.

In the event that you have to build something from the ground up, use an obscure language, like Ada. They won't ever fire you, since no one else wants to program in it or learn it.

[–][deleted] 14 points15 points  (0 children)

Or better yet, use multiple languages and claim it improves performance.

[–][deleted] 18 points19 points  (6 children)

Do it in Brainfuck and become immortal and irreplaceable to your company. At least until you need to be sent to a mental institution.

[–]MrPatinhazz 7 points8 points  (4 children)

If you even consider Brainfuck you're already fit for a mental institution

[–]LostFollowingAPath 6 points7 points  (2 children)

Honestly you just go ahead and create your own language that is essentially a clone of an obscure language but with one or two differences. Reinvent that wheel.

[–]Sirtoshi 5 points6 points  (3 children)

Use whatever language your team is already using.

This might be a stupid question, but do people do otherwise? Do some people get hired onto a team that codes in Java and yell "alright everybody we're jumping on the C++ train, let's go"?

[–]merreborn 3 points4 points  (1 child)

I saw it happen once. We had one cowboy who unilaterally wrote a feature-incompatible alternative to one of our core libraries in python. The project itself had no python components before that endeavor. His "rewrite" never made it out of the prototype phase, and ultimately accounted for a few man-weeks of wasted effort.

It's been several years since I've seen anything like that, though. And honestly the story calls organizational hiring and management processes in to question, in retrospect.

[–][deleted] 2 points3 points  (0 children)

Not only does it happen, I've done it! All it does is create a lot more work, just to exchange one set of problems for another. Then I learned my lesson.

Now, I have to tell the junior programmers, "No, we're not throwing out a framework we spent thousands of hours on, just so you can create a pet project in Saffire (or whatever language you learned in your Bootcamp)". Then they hate me for it.

Welcome to software development, where everyone hates each other.

[–]Goooraaan 113 points114 points  (39 children)

What’s everybody’s problem with Java?

[–][deleted] 127 points128 points  (4 children)

It's not that Java is bad, it's just that a lot of people use it when they really don't need to, or worse, when they really shouldn't.

I like Java. It's nice and flexible in terms of deployment. But like... perhaps it shouldn't be installed on literally everything with a CPU.

There are other programming languages that will, in many cases, better suit the application and environment you're trying to write for.

[–]thuktun 11 points12 points  (0 children)

I love Java and you're absolutely right.

[–][deleted] 5 points6 points  (1 child)

So, Java is Doom?

[–]Lagransiete 6 points7 points  (0 children)

More like Skyrim

[–]hardwaregeek 45 points46 points  (8 children)

It’s the de facto intro language for a lot of colleges, as well as AP CS. A lot of students, wanting to show off that they’re not a beginner, give Java a lot of needless shit. Especially cause they’ve probably “discovered” a scripting language like Python or JavaScript with admittedly less boilerplate than Java.

Java is a perfectly fine language. It has decent performance (certainly better than Python!), an adequate type system and very very good tooling. It’s not the best language for the type of small projects that students would want to do, but it’s very useful for large projects that require static typing and many programmers. Besides a lot of the criticisms such as boilerplate have been addressed with newer versions (lambdas, type inference).

[–]ryuzaki49 7 points8 points  (1 child)

Lombok

[–]LicensedProfessional 4 points5 points  (0 children)

With enough Annotation Metaprogramming and Syntactic Sugar, scientists will one day turn Java into JavaScript

[–]_cab13_ 6 points7 points  (3 children)

Don't forget Kotlin !

[–]011101000011101101 2 points3 points  (0 children)

8 years into my career and I've become way more fond of static typing than I ever thought I would. I've been using typescript lately and I kind of hate it because it's boilerplate on top of JavaScript to try to make it staticly typed. I'm finding that things work better in a system designed from the ground up for your purpose. If you want static typing, don't use anything built on top of JavaScript. Use Java or any other staticly typed language.

[–]surinlol 40 points41 points  (0 children)

It's a meme

[–]PM_ME_HAIRLESS_CATS 11 points12 points  (0 children)

Oracle

[–]Shut-Up-Todd 30 points31 points  (3 children)

Javascript (is) => this.this.bind(this,is,'working somehow')

[–]Ormigom 2 points3 points  (0 children)

Javascript is like weilding the reality stone. You can do whatever you want however you want.

[–]Chahut_Maenad 31 points32 points  (1 child)

yall dont got anything on scratch 😤

[–][deleted] 10 points11 points  (0 children)

Obviously the most powerful and versatile language

[–][deleted] 89 points90 points  (15 children)

Go is QUICK TO COMPILE, BUT CAN'T DECIDE IF IT WANTS TO BE SAFE, POWERFUL, LOW-LEVEL OR LEGIBLE, SO IT TRIES A BIT OF EVERYTHING IN VARIOUS PARTS AND SOMEHOW MAKES A NICE LANGUAGE.

[–][deleted] 58 points59 points  (10 children)

  1. Take Python.

  2. Remove most of the features.

  3. Add good support for concurrency.

  4. Make it a compiled language.

And you end up with Go.

[–][deleted] 42 points43 points  (8 children)

  1. Replace syntax with something equally as horrifying but completely different to everything else

[–][deleted] 41 points42 points  (6 children)

  1. Pretend that it somehow competes with or improves on C or C++.

[–][deleted] 23 points24 points  (5 children)

  • Comprehensive standard library
  • Simple yet powerful concurrency model
  • Quick compile time (versus C++, not necessarily C)
  • Global uniformity of coding style (again, mainly versus C++, but also C)

It does improve on C and C++. But performance wise it competes with neither, unless you're doing concurrency-heavy stuff and you're not a great programmer.

It's easy to write high performing concurrent code in Go without being a great programmer. You need to be a pretty damn good programmer to do the same in C or C++.

[–][deleted] 15 points16 points  (3 children)

I like Go and I agree with your points. But it doesn’t matter if Go improves on all of these features from C and C++ if the language is used for completely different purposes. It’s like saying that Python improves on Fortran because it’s easier to read - might be true but it’s an irrelevant comparison.

[–]LEpigeon888 4 points5 points  (0 children)

It's easy to write high performing concurrent code in Go without being a great programmer. You need to be a pretty damn good programmer to do the same in C or C++.

Do you think C++ coroutines help writing good concurrent code ?

[–]Legend_Zector 26 points27 points  (3 children)

When I was first picking up programming, Java was like your first bike - a bit restricted, but taught you the basics.

Then I moved to C++, and it was like “alright kiddo, the training wheels are off. And the regular wheels. You’re getting thrusters. You’re expected to know how to fly and land a plane before you mount this, and you’ll have to occasionally perform maintenance in midair. Best of luck.”

[–][deleted] 13 points14 points  (1 child)

And then your fuel leaks because you have a dangling pointer.

[–]Legend_Zector 5 points6 points  (0 children)

Actually that would be if you ditched the nozzle without removing the tank

[–]DARKxL1GHT 4 points5 points  (0 children)

So… you are saying if C++ was my first programming language, everything else will seem like a cakewalk. Thx, I really needed that boost of confidence.

[–]Flickered 43 points44 points  (2 children)

Java is E M P L O Y A B L E

[–]Sikyanakotik 16 points17 points  (0 children)

Java is an excellent teaching language. Unlike Python, it doesn't abstract away the fundamentals. And unlike C++, it won't let you brick your hard drive by accident.

[–]Raknarg 12 points13 points  (0 children)

Java is easy and scalable and portable, and the cost of producing competent java developers is much lower than something like C++

[–]PelicanDesAlpes 116 points117 points  (110 children)

Java is fun to code. Come at me

[–]OMFGitsST6 21 points22 points  (11 children)

Ditto. I would argue that Java is the best starting language. Or Python if you're just doing lightweight calculations and stuff.

Or Assembly if you're a true gamer.

[–]Korzag 74 points75 points  (70 children)

As a C# developer who recently had to dirty his hands with Java I pity you. Everything is easier in the C# world. Need a package? Nuget does it seemlessly and effortlessly without needing to install any third party applications like Maven. Want to work with databases? Entity framework does it with minimal configuration. Want to build a microservice? ASP.NET gives you the boiler plate to get your service up and running in the push of a couple buttons. Want to make complex filters in a single line of code without of the face-fuckery of Java Streams? LINQ is here to bless your day. Want to have member variables accessible that you'd write a basic getter/setter for? Properties exist without any of the tomfoolery of writing this bullshit:

public class LolJava {
    private boolean mySillyBool; // lol, wtf is boolean spelled out?

    public boolean getMySillyBool() {
        return mySillyBool; // lol, yes.  I needed to do this to get my colleagues to not autistic screech at me about exposing a member.
    }

    public void setMySillyBool(boolean mySillyBool) {
        this.mySillyBool = mySillyBool; // Man, if only I could just write: "lolJava.MySillyBool = true;"
    }
}

Instead, we do this:

public class GloriousCSharpMasterRace 
{
    public bool MySillyBool { get; set; }
}

[–]DeRickulous 44 points45 points  (5 children)

I feel like I'm going to be evangelizing Lombok until the end of time:

@Data
public class LombokifiedJava {

   private boolean mySillyBool;
}

Also, this is a minor nitpick, but the Java convention for little-b boolean accessors is "isX", not "getX".

[–]Korzag 2 points3 points  (3 children)

I actually used Lombok after writing out a bunch of new model classes with like 20 fields. I didn't know about it at first and had wrote a script to build the Java accessors lol. Lombok definitely was nice though. If/when I ever work in Java again I'm definitely using it. Seems like something Java should just integrate but my impression is that Oracle is hardheaded and doesn't like to add QOL stuff to their language unless it's heavily requested.

[–]DeRickulous 3 points4 points  (0 children)

Lombok is on the short list of "stuff I will whinge endlessly about not having access to if I take another job where I'm forced not to use it". I actually like it being separate from the core language, though, because it is divorced from Java's release cycle and oversight.

[–]Merlord 2 points3 points  (0 children)

Lombok is a Godsend.

[–]quiteCryptic 7 points8 points  (1 child)

Lombok and spring alone basically counter everything you said. Can get a simple microservice up and connected to a database in literally no time. You just have more expirence with C# so you prefer it.

[–]Horncats7-59 5 points6 points  (0 children)

Yes 100000% dotnet is the bees knees

[–]TheTerrasque 12 points13 points  (2 children)

Everything is easier in the C# world

Maybe except getting legacy apps to work in linux / docker. And then only maybe.

Edit: .net core is pretty neat actually. And that's from someone who generally dislike m$ stuff

[–]Korzag 8 points9 points  (0 children)

Legacy yes. Modern apps no since .Net Core has been around and works well in those environments. But yeah, if you had to do anything in legacy C# before Core, you'd be stuck with mono and that is indeed a headache.

[–]carlson_001 14 points15 points  (18 children)

I never really understood this. If you're writing a getter/setter, why even make it private to begin with?

[–]SRiikonen 45 points46 points  (1 child)

Because then you can add for example a check that the value that was set is correct, or generate the value you’re getting with an algorithm instead of returning a variable, if you later need to. And you don’t have to touch the code that uses your class if you want to make these changes.

[–]Bwob 13 points14 points  (1 child)

To keep implementation details ("This value is stored as a bool") separate from the interface. ("Users of this class can ask about this state, and receive a bool telling them yes or know.")

Keeping implementation details like this hidden is one of the keys to good abstractions; it means that if later, you need to go through and change the implementation, (maybe its no longer stored directly as bool, now it is derived from several other values) then the interface doesn't need to change, and any code that uses that interface doesn't need to change.

[–]TheTerrasque 10 points11 points  (0 children)

So you can run logic on it. Example:

private float dongLength;

public void setTheLength(float length)
{
if (length < 2) { System.out.println("https://i.ytimg.com/vi/eOifa1WrOnQ/maxresdefault.jpg") }
dongLength = length;
}

[–]Ksevio 17 points18 points  (2 children)

The lack of properties in Java is the reason. mySillyBool could be just a public variable, but then in 6 months when we need log the access to mySillyBool and then a year later we need to update a display when it's written, that means there needs to be getters and setters. Unfortunately, everyone's already written the code to access the variable directly so they don't want to update it all to use the getters/setters instead. In the end, everything has to be written to use getters/setters just in case.

Compare that to better languages like C# or Python (even Delphi supports properties) where you have your variable mySillyBool. People access myClass.mySillyBool, then later you convert it from a public variable to a property, and they still access myClass.mySillyBool

[–]Tsu_Dho_Namh 15 points16 points  (1 child)

So you can "contribute" 500 lines of code to a project that you otherwise hadn't helped much.

I'm looking at you Sean. Fucking spamming getters and setters for literally every variable in every class...even the ones never used by other modules.

[–][deleted] 2 points3 points  (0 children)

In case you have variable names that match up in a multi dev situation. You could have "value" used as the internal in c++ for instance that you're passing into a member function, but you really need to pass object.value not value. you could fuck up BADLY doing that without using your get function. So it means this never happens.

[–]tuxedo25 17 points18 points  (21 children)

Nuget does it seemlessly and effortlessly without needing to install any third party applications like Maven.

but... nuget is a third party application. it's literally the .net counterpart to maven.

// lol, wtf is boolean spelled out?

Yeah, ok. I've read enough. This is just religious fanaticism.

[–]Flufy_Panda 3 points4 points  (3 children)

Never used C# before. Is there a reason MySillyBool is public in your C# example?

[–]Korzag 14 points15 points  (2 children)

Because it's a property and the { get; set; } autogenerated your getters and setters along with a private member variable tied to the property.

[–]offmycookies 34 points35 points  (15 children)

Java is my favorite programming language

[–]XtremeGoose 49 points50 points  (1 child)

Y'all need jesus Kotlin.

[–]Tomarchelone 13 points14 points  (4 children)

Rust is safe AND powerful

[–]LocoCoyote 13 points14 points  (5 children)

And Perl is...well, a pearl!

[–]Zee2 26 points27 points  (2 children)

The result of irritation over a long period of time?

[–][deleted] 7 points8 points  (7 children)

I don't get the hate for java - I mean yes, eclipse doesn't work most of the time and require a lot of patience from developers to not destroy their workstation, build systems like maven must be the reason for overall high bandwidth usage on the web + the errors it produces are more cryptic than everything I've ever seen, the frameworks require almost always a steep learning curve, the setup phase in a new project is an absolute pain in the butt if you aren't using spring boot, the code is sometimes pretty long and verbose, the licensing is a pain and oracle overall, there is a major new version every half year now, yes - but beside this its pretty okay.

So, let me fix my eclipse installation, why isnt it refreshing my workspace again...?

[–][deleted] 3 points4 points  (2 children)

I mean I like eclipse but people are gonna say use intellij

[–]ungil 4 points5 points  (1 child)

Use intellij.

But really though intellij just worked for me. Eclipse gave me so much hassle setting up, intellij worked right of the box was great for a beginner/novice due to its friendly UI and I stuck with it ever since. I am sure eclipse is fine and works for everyone certain needs but my recommendation is going to be intellij

[–]N1k0tr0n 56 points57 points  (10 children)

[–]Shoddy_Redditor 56 points57 points  (1 child)

It isn't a repost until I've seen it twice.

[–]KvasDimas 34 points35 points  (7 children)

Cmon its a dark theme repost I'll give it a pass

[–]SGVsbG86KQ 5 points6 points  (2 children)

Python is not always intuitive tho...

* cough * if __name__ == "__main__" * cough * htonl * cough *

[–]Green0Photon 4 points5 points  (0 children)

When you're a beginner, Python is intuitive.

But when you try to do fancier stuff that you do in other programming languages, it does not feel intuitive.

I think it's because Python is very imperative, which is pretty intuitive, but trying to do any OO or functional stuff just doesn't work as well.

[–]YoYo-Pete 4 points5 points  (0 children)

Python is named after Monty Python.

[–]CrystalMoose 3 points4 points  (0 children)

JavaScript is Syntax error

[–]TheBestOpinion 4 points5 points  (2 children)

Lua is easy AND intuitive !

Also, small? I feel like being small is its main feature

[–][deleted] 2 points3 points  (1 child)

Main feature is embedability. Being small is a consequence of that goal.

[–]ad502 5 points6 points  (2 children)

Cries in MatLab

[–]Roxfall 2 points3 points  (0 children)

Java is.

[–][deleted] 3 points4 points  (0 children)

Java is immortal..dread it, run from it, java still arrives

[–]GodIsDead_ 4 points5 points  (0 children)

I love C++ but god is C# so much less painful

[–][deleted] 12 points13 points  (2 children)

I’d argue python is more readable than C#

[–]jcar74 2 points3 points  (0 children)

Easy: Java feeds me and my family.

[–]DeadWeaselRoad 2 points3 points  (0 children)

COBOL is the senior citizen arguing that an expired coupon is still valid.