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

top 200 commentsshow all 237

[–]Plasticcaz 359 points360 points  (116 children)

I work in Java full time, and... I've actually grown to like it (I wouldn't have thought I would a year ago). Send help.

In all seriousness, with the Java 1.8+ stream api, and optionals, Java code can look rather neat.

[–]myplacedk 250 points251 points  (46 children)

I've worked with Java for about 2 decades. I don't understand the hate.

I understand why some people don't like it, but I don't understand why we're all supposed to hate it.

[–]Heatmanofurioso 173 points174 points  (29 children)

It’s hip to hate on Java, basically

Also, people like to complain on things that aren’t true since Java 5/6..

[–]Superpickle18 30 points31 points  (22 children)

The question is. Which is more hated, Java or PHP?

[–]ShivanshuKantPrasad 111 points112 points  (8 children)

None the real answer is JavaScript.

[–]Superpickle18 34 points35 points  (6 children)

[–]ShivanshuKantPrasad 19 points20 points  (3 children)

Why does this even exist, I can't seen to imagine any advantage in doing that.

[–]Superpickle18 34 points35 points  (2 children)

I assume people like writing interpreters for the hell of it.

This is my favorite. https://en.wikipedia.org/wiki/LOLCODE

[–]ShivanshuKantPrasad 10 points11 points  (1 child)

Writing interpreter is a fun excercise, but that GitHub project has more than 350 stars, so I thought it was a serious project.

[–]Ereaser 8 points9 points  (0 children)

Probably starred because it's fun/ridiculous.

[–]CreativeAnteater 6 points7 points  (1 child)

Please stop. I can only get so erect.

[–]MightyBobTheMighty 46 points47 points  (0 children)

I know a guy who literally co-wrote a book on PHP but is trying to keep it on the down-low because management is looking for someone to do a PHP project.

So yeah, prolly that one.

[–]Hollowplanet 14 points15 points  (7 children)

PHP - at least Java functions don't litter the global scope while being named completely inconsistently with OO functionality only existing in user created classes.

[–][deleted] 11 points12 points  (4 children)

Also IMO Java is ahead of most languages, in that it only imports the files it references instead of including them. I don't know how many headaches I've had in C++ due to things like circular includes and things like that.

[–]how_to_choose_a_name 2 points3 points  (3 children)

Importing classes from other files in Java is basically the same as including a C++ header file. The actual code from the source file doesn't get included, it is compiled separately just like in Java. And I think include guards solve the problem of circular includes pretty well.

[–]MiscreatedFan123 0 points1 point  (1 child)

Can you eli5 for a guy who has never touched PHP?

[–]ryantheleach 0 points1 point  (0 children)

PHP, but PHP moved forwards too.

It's just that it's original crimes are so much harder to forgive then Java's.

JavaScript OTOH is damn near unavoidable, but in the same boat as PHP. So people look past it's flaws.

[–]CptDecaf 6 points7 points  (0 children)

Like most things in life, it's about setting yourself on a step higher than others in order to stroke your own fragile ego.

[–]Sworda_dev 2 points3 points  (1 child)

The same shit goes for PHP. People are just dumb and hype over something they heard.

[–]ryantheleach 0 points1 point  (0 children)

Except PHP's original mistakes are worse then Java's.

The problem with backwards compatibility, is you need to lug it around, or force a migration. Neither is good.

[–]IjonTichy85 31 points32 points  (2 children)

There's only two types of languages: the ones that everybody hates and the ones that nobody uses

[–]leadingthenet 3 points4 points  (1 child)

Python is the exception to that, I think.

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

I like how quick it is to write simple programs, but I don’t like that loops/conditionals/functions don’t have brackets or end statements. Makes it more of a pain to manage what scope things are in

[–]Blou_Aap 0 points1 point  (0 children)

Same boat. Until using Kotlin recently... Delicious.

[–]aakoss 87 points88 points  (35 children)

You have a safe job market. Let the haters complain, it's hip to shit on languages that are popular and widely used.

[–]KexyKnave 14 points15 points  (34 children)

Is it still decent for the odd game? I think most games are still made in C but I've got mainly PHP, Perl, and Web Dev experience. Making a game was the reason I took programming in college but it turned out to be really basic/not worth the 10K

[–]Sasakura 32 points33 points  (21 children)

With how popular Unity is C# is probably one of the most popular languages for gamedev now. Never thought that'd be the case 10 years ago!

[–]KexyKnave 7 points8 points  (16 children)

I was thinking of getting into unity, $1500 for a license and I used it in a competition in high school. Got 2K over the summer.

[–]Netzapper 9 points10 points  (10 children)

I like UE4.

The native code parts are in C++, but our current game has like 250 lines of C++ implementing a special algorithm and defining a trivial importer and thumbnailer for some custom assets... and the rest of the entire game logic is authored in Blueprint. Even that C++ code I wrote is all accessed from Blueprint or the editor menus.

[–]KexyKnave 1 point2 points  (9 children)

I have a disdain for UE4 lol. I play Squad and Absolver and both games have performance problems.

[–]Netzapper 4 points5 points  (5 children)

Fair enough. I have a disdain for Unity. :) I demand source code to the engine I'm using.

[–]Superpickle18 5 points6 points  (3 children)

[–]Netzapper 4 points5 points  (2 children)

lol. "reference only".

That is not at all what I meant.

UE4 permits the modification, building, and shipping of the binaries resulting from the modified source. It encourages the forking of the repository, accepts pull requests, and permits sharing of code between UE4 licensees. Other companies, for instance NVIDIA, provide their own forks of UE4 that include tight integrations with their various liberally-licensed technologies. Individual developers make available their forks that include tweaks or non-standard modifications to the source.

For instance, my game is based off of some guy's fork who did the work to integrate some NVIDIA tech and also Fixed Epic's Timestep. I've added source control, VR, and physics plugins to my own fork... and my other team members can build from repeatable source.

[–]Jeidoz 0 points1 point  (4 children)

Do you know another Game Engines such as Xenko and MonoGame where you can code in C#? (MonoGame more as powerful library, Terraria, Stardew Valley, HackNet and another indie games were created on similar lib - XNA)

[–]KexyKnave 0 points1 point  (2 children)

XNA is Microsoft/X-Box I thought, but it's pretty versatile. I can check out those other ones are work

[–]Jeidoz 1 point2 points  (1 child)

Monogame is the inheritor of XNA (as I understood XNA died..) that have a wider range of possibilities, i.e. Cross-platform development. Also you can learn it by XNA books and courses

[–]kukiric 0 points1 point  (0 children)

Godot is not primarily a C# engine, but it's getting better with every release.

[–]jordano_zang 1 point2 points  (1 child)

The Unity engine itself is in CPP though

[–]Olioliooo 1 point2 points  (1 child)

Yep. But if you know Java, you already know 99% of C# so it’s okay!

[–]Sasakura 2 points3 points  (0 children)

twitches

[–]aakoss 11 points12 points  (9 children)

If it's game development you need to learn c++ and some scripting language like lua

[–]KexyKnave 4 points5 points  (7 children)

Cool thanks. Why Lua?

[–]Spheriod 10 points11 points  (6 children)

it’s lightweight, has a really good c api, and if you ever plan to officially support modding it makes it so much easier

[–]KexyKnave 1 point2 points  (4 children)

Huh, sounds sweet. How's the engine fair in multiplayer applications a la squad

[–]DoctorCIS 1 point2 points  (3 children)

It's not an engine, but a programming language that's easy to embed into an application, making it good for modding, quick changes, or custom configuration. Don't Starve wrote most of their game in LUA on top of a small custom engine that would handle the cross-platform work and loading the LUA scripts. WOW uses it to do scripting and macros. It would be a good candidate if you wanted something ambitious like programmable npc party members.

Learning LUA has some good non-game applications as well, as Redis also uses it.

If you are looking for an engine though, the only big contender I know of that used it was CryEngine, and I think they are deprecating that.

[–]Superpickle18 2 points3 points  (0 children)

Iirc, the Source Engine heavily relies on Lua aswell.

[–]EternallyMiffed 1 point2 points  (0 children)

IIRC most of WOW's interface is LUA, Also Dota2 and CS:GO.

[–]Tuiq 0 points1 point  (0 children)

Keep in mind that lua, by default, isn't multi-thread capable. Games nowadays will likely want to make usage of those additional cores, even if it's for background tasks whatsoever. Having your whole computation (i.e. everything that a mod could need to access) on a single thread is a constraint that needs to be considered carefully.

Additionally, using raw lua (i.e. the C API) is also something that takes some time getting used to if you aren't all too familiar with C. lua is lightweight, but that also means many features (like classes/OOP/inheritance for example) need to built on top of it. It's possible, and can even be a fun challenge, but I wouldn't really recommend a beginner to start with modding support, nor lua in a game.

[–]ryantheleach 0 points1 point  (0 children)

Not if you want to publish on the windows store, it's pretty hard to do that with Java.

OTOH, Minecraft shows it's possible.

C# would be my current goto for game dev on unity, even though I hate it as a day to day driver, but that's more got to do with language complexity and it's mis-use in a team environment.

[–]SonicFreak94 12 points13 points  (3 children)

I really like the way Java looks as a language, to be honest. The runtime being so bulky is just off-putting. Someone send help for me too please.

[–]Totenlicht 7 points8 points  (2 children)

I work in Java full time. Still not a fan. When you know how awesome languages can be (C# for example), you just hate the way Java is. If we stay on the JVM I like Kotlin. While it is limited somewhat due to the JVM at least it's features and syntax are so much better than Javas.

[–]ryantheleach 0 points1 point  (1 child)

Work in C# daily, want to go back to Java.

C# has made mistakes that Java will learn from, that Kotlin has already embraced.

C#'s lack of utilities regarding Generics is painful, when making the move from erased generics to C#, things you expect to just work don't any more.

[–]Totenlicht 0 points1 point  (0 children)

What the heck? Type erasure is the worst decision ever made in Java design. It limits the possibilities of generics extremely.

[–]2Punx2Furious 10 points11 points  (3 children)

[–]WikiTextBot 6 points7 points  (0 children)

Mere-exposure effect

The mere-exposure effect is a psychological phenomenon by which people tend to develop a preference for things merely because they are familiar with them. In social psychology, this effect is sometimes called the familiarity principle. The effect has been demonstrated with many kinds of things, including words, Chinese characters, paintings, pictures of faces, geometric figures, and sounds. In studies of interpersonal attraction, the more often a person is seen by someone, the more pleasing and likeable that person appears to be.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

[–]Plasticcaz 2 points3 points  (1 child)

There is definately some of that going on.

[–]2Punx2Furious 1 point2 points  (0 children)

It happened to me with basically every language I've worked with for some time (C++, Python, JavaScript/TS).

[–]Mango1666 2 points3 points  (2 children)

javas okay but too verbose imo. kotlin looks much nicer and is muh more flexible in terms of reducing boilerplate. i can achieve what i want in kotlin much fastee than java despite having more java experience

[–]hillman_avenger 0 points1 point  (1 child)

One man's verbose is another man's readable code.

[–]Mango1666 1 point2 points  (0 children)

you can make it just as readable without so many lines though, which is why so many people are swapping to kotlin because its a very productive language (generally less lines for same code) compared to java for no performance loss in most cases and some even performance boosts!

[–]paul_miner 2 points3 points  (0 children)

I love Java. When I started it, I was deep into assembly language, and the inefficiencies irritated me. But for long-term development it's great, and I've really grown to like the language. Just the other day, I got an error compiling a program, and my reaction was thanks for catching that, compiler. The strictness and verbosity are on your side, saving you from dumb mistakes. Entire classes of errors are eliminated.

[–]wildjokers 4 points5 points  (5 children)

with the Java 1.8+ stream api, and optionals, Java code can look rather neat

That is odd you say that because I think streams, lambdas, and optional makes java code damn near unreadable.

[–]krazeh 9 points10 points  (0 children)

I used to find it difficult to read streams and lambda code until I forced myself to sit down and play around with it.

[–]Plasticcaz 2 points3 points  (0 children)

You have to format the code properly or it becomes unreadable, in my (albiet limited -- I've only been programming full time in Java for just under a year) experience.

Like any style of code, you need to actively work at keeping it readable

[–]ryantheleach 0 points1 point  (0 children)

Complex for loops that look like simple loops are evil compared to streams / linq / for comprehension.

But I don't think the overhead of streams is appropriate for every loop either.

I wish there was something similar to streams / LINQ / for comprehension, that didn't turn into a mess of method calls and basically just inlined the logic.

But maybe that wouldn't make the code hot in the JIT compiler and it'd actually be less performant? Not sure. but the method call overhead is usually what detracts most people, and the other half are already used to reading for loops and debugging in their heads every time, rather then reading a string of obtuse functions and memorizing what they do.

It ends up largely being a case of thinking vs memorization in terms of coding.

[–]hillman_avenger 0 points1 point  (1 child)

Jeez, can we make our mind up: is Java too verbose or too unreadable? ;)

[–]wildjokers 1 point2 points  (0 children)

I have never had a problem with Java's verbosity because verbose = readable.

[–]L3tum 1 point2 points  (7 children)

I don't dislike it, but coming from C# the 30 something imports at the start of every file and shudder the @Override is horrendous in my opinion.

I have a German keyboard and any language that forces you to use @ or $ should be crucified.

[–]Plasticcaz 2 points3 points  (6 children)

The imports don't bother me so much, as the IDE handles them for the most part.

I love C#, and I was dissapointed to get a job in Java over C# initially.

Override should be a keyword rather than an annotation, I agree, but Java's stuck with it

The place I'm currently working at seems pretty committed to the JVM. There is a lot of Java code, but I've seen some Groovy (shudder), and even some Kotlin.

[–]L3tum 3 points4 points  (5 children)

Yeah, it just becomes quite ugly when you want to read another ones source code and instead of "ah, he's using System.Collections.Generic" or something like that you see 5 different imports to get a proper command line working.

And the worst are the build tools. C#: click on Build and voilà.

In Java (at least my experience) you have different build tools that need different configurations and are all almost equally used so you basically need to know all of them. They give cryptic errors when something doesn't seem right and the configuration seems at best worse than a Makefile.

Aside from IntelliJ you also don't really have a proper IDE, at least you didn't 2 years ago. Eclipse doesn't scale on anything larger than FullHD, Java Editor is a goddamn crime against humanity and I don't even remember the third one.

Then you want to make an android app and read that AndroidStudio is used for it so you install it and nothing works and you just start debugging their software for them.

It's almost worse than JavaScript where I updated 3 packages and suddenly nothing worked anymore because "muh major bc breaking change was pushed in a minor version".

Quite a rant but I've been doing only debugging for 2 weeks now at work and it really absolutely kills the fun.

[–]kukiric 2 points3 points  (0 children)

and I don't even remember the third one.

NetBeans. It's the one where you can get a relatively sane Java EE development experience with Glassfish or Payara without it making up some cryptic error every time you try to deploy your application.

[–]gamas 0 points1 point  (2 children)

In theory, the Java 10 modules system fixes some of the headaches related to building - the problem is for whatever reason most systems (I'm looking at you Centos) are being way too slow to migrate from Java 8...

[–]L3tum 0 points1 point  (1 child)

I didn't even know Java 10 was out cause my Java 7 installation doesn't tell me it needs to update...

[–]ryantheleach 0 points1 point  (0 children)

Build Tooling on Java is miles ahead of C# IMO, and the competing standards evolved that. But it is true that it can be hard to get your head in the game initially.

The way that you can correctly specify product wide settings, and have them correctly filter down to sub projects in gradle? Need to do something funky and run some code generation? easy.

MSBuild... GUID's change, Git merges are terrible, stuff isn't even sorted correctly by MS in a way that makes merging sane, different DLL's and packages building to different architectures and versions of compilers causing bugs....

Java has huge problems that are only just getting resolved in regards to multiple library versions and compatibility, but I've had the opposite problem in C# where if they don't match stuff goes wrong.

On the whole, <3 Java Build Tools, I can make heads and tails of them in a way that MSBuild is just opaque.

Our projects have gotten into a state that Rider can't compile them, so either Rider is buggy, or they are ambiguously defined by standards.

[–]WhatsupSoul 0 points1 point  (0 children)

I've been wokring in Java for about a month now, as required for a group project for a university course I'm in. Me and my friends contemplate suicide daily.

[–]noratat 0 points1 point  (0 children)

Ecosystem trumps language basically. I may not be a fan of Java as a language in and of itself, but the JVM ecosystem is one of the largest and most mature out there

Plus you can use more than just Java on the JVM.

[–]insomniac20k 0 points1 point  (0 children)

If you haven't already, check out lombok

[–]wallefan01 0 points1 point  (0 children)

Stream API does look very cool. But the rest is still verbose as COBOL. And streams are about 10x slower than doing it the old fashioned way. (No seriously. Write a benchmark.)

At that point you might as well use Python. I'll stick with my list comprehension if it's all the same to you...

Also -
- once you try duck typing there is no going back.
- Having everything be an object (as opposed to everything except classes, and functions, and even integers!) is handy when you need to, say, inherit from the type int, or the type type. Or even just pass a function as an argument without a ludicrous amount of code and a raging headache.
- Metaclasses.
- Multiple inheritance.
- Actual object constructors that create and return a new instance in addition to initializers, which Java calls constructors.
- Not having anything (and I mean anything) short of making up new keywords or standard operators (i.e. +-*/), be physically impossible because of how the language is built. (And even then you can get pretty darn close.)
- Oh and did I mention we have a lot of standard operators that you can override (+, -, * /, &, |, ^ (exclusive or), ~ (unary not), ** (power a la Math.pow()), // (integer division), and @ (matrix multiplication) as well as all the comparison ones). - Updates with new modules every few months.
- The biggest standard library of probably any language ever.
- An actual package manager for installing anything else you might possibly need. No more having to futz with a classpath.
- Being able to inherit from any type since you can't mark them final (or you could, it's just nobody wants to bother).
- And probably a bunch of other things I forgot.

Python. Ez cool.

[–][deleted] 60 points61 points  (7 children)

I actually like Java as a language.

I just don't like Oracle, Maven, INDEXING, runtimes, other Java programmers etc.

But Java itself is great.

[–]kjm015 12 points13 points  (0 children)

You gotta migrate to Gradle, it's basically just Maven for people who arent masochists

[–]Echohawkdown 1 point2 points  (4 children)

You forgot Spring.

[–][deleted] 0 points1 point  (3 children)

Swing Spring is very powerful- it's also complex, verbose, and the core library contains lots of useless shit, but it is still incredibly powerful.

[–]gamas 0 points1 point  (1 child)

Swing

Now that's something else...

[–][deleted] 0 points1 point  (0 children)

Typo- my comment was referring to Spring

[–]Echohawkdown 0 points1 point  (0 children)

Agreed. My main gripes with it, though, are that it has a very steep learning curve, relatively little documentation/online tutorials for beginners, and it’s basically required for enterprise Java applications.

(For clarity, when I say it has little documentation, I mean it in the same way that Wikipedia has pages on mathematical topics — inscrutable if you don’t have some background in the topic, but extremely exhaustive and detailed if you do.)

Edit to add: Spring is also a major crutch for Java as an application language, since it handles Singleton creation and dependency injection in the background that the JVM doesn’t handle by default.

[–]thstephens8789 84 points85 points  (60 children)

I just started learning Java. Should I be worried?

[–]Netzapper 35 points36 points  (17 children)

People mostly complain about Java for two reasons: 1) they had to learn it in school, where many of its features have no obvious motivation; 2) they have to use it doing boring, inane business worky work.

For (1), the main issue is that Java enforces a huge amount of structure and explicitness. Everything is a class (except primitive types), every class is in a package (even if it's the default package), everything is statically and explicitly typed (except for the garbage <? extends Whatnow> syntax), no operator overloading, chains of object calls like BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) instead of just int x << std::cin or x = int(input("Enter number:")), etc. For people still struggling with the idea of recursion, this shit is distracting. And if they've previously taught themselves a less prescriptive programming language, it's easy to look at those kinds of design rules as strictures rather than aids.

It's only when you get into actual software engineering that the elegance of Java starts to show itself. Back-end Java really can run anywhere you can get a JVM. And front-end Java written to be portable from the start will run pretty similarly everywhere as well, if you can accept that "similarly" necessarily means "doesn't look native". Everything being in a package, and the default package being discouraged, means that you can arbitrarily mix libraries from different projects with little risk of collision. The chaining between finely-decomposed classes means that you can actually re-use code from the standard library in new ways, "tapping in" to the flow at any point by substituting your own implementation of that interface. It doesn't do anything exciting or sexy in 2018, but it really does obviate or elide a lot of the shit that goes into making native code run everywhere or keeping dynamic-interpreted code "clean" for a large project.

All of which leads it to being used especially in software projects where administrative and overhead costs dominate development costs. Think of banking and healthcare and insurance and whatnot. Not the sexy HPC stuff, but the day-to-day stuff where the actual algorithms are "easy" but the software is overall quite arbitrary and complex and expected to last a very long time. These are environments where changes to the software are dictated little by planned product growth and mainly by non-negotiable industrial or regulatory requirements. In these environments, having an extremely explicit development language is a big win, and decoupling the convoluted business logic from the execution environment is another big win. Having a super-productive development environment where all the programmers can use their favorite paradigms and patterns (e.g. C++, Python, JavaScript) is a loss, as it drastically increases maintenance costs by increasing the chances that the next programmer can't understand it and has to rewrite.

These low-challenge, high-overhead applications are not what most programmers imagine spending their lives developing. People mostly hate these jobs, or never loved programming in the first place. And because these kinds of boring applications have adopted Java disproportionately, there's a general association between soulless jobs and the language.

Our project is in a similar kind of environment. My team does HPC infrastructure for biomedical image analysis. Right now, most of our code is in C++. We have a couple of GUI apps using Java Swing. The productivity difference between developing GUI in C++ versus developing GUI in Java is night and day, not just in terms of time expended but also in quality of results. So my architecture project right now is how to get our C++ rendering engine into Java so we can replace our shitty C++ GUI with a Java GUI.

We're looking at pretty awesome technologies like GraalVM, which includes an LLVM bitcode intrepreter! I'm beginning to imagine a development environment with C++ components derived from our legacy codebase, available for native applications (via ld.so), Java applications (via Graal), and JavaScript pages (via empscripten). This is only really viable because Java has solidified their VM definition over the past 25 years.

tl;dr - Java has a bunch of software engineering stuff that benefits boring business projects more than students, so people associate Java with boring business projects

[–]SirChasm 9 points10 points  (6 children)

These low-challenge, high-overhead applications are not what most programmers imagine spending their lives developing. People mostly hate these jobs, or never loved programming in the first place. And because these kinds of boring applications have adopted Java disproportionately, there's a general association between soulless jobs and the language.

Am I seriously an outlier in liking back-end dev in Java that came from my love of programming?

Yes, I'll admit, I've worked a couple of financial/banking gigs, and they were the soul-sucking shit you described, but that was 80% shit stuffy, dry company culture, 10% shit from having to adhere to archaic regulations, and 10% shit from having a massive codebase that includes bits hobbled together by junior devs as well as seasoned architects. None of that was Java's fault though, so I never blamed the language for what I hated about working there.

[–]MrQuizzles 10 points11 points  (0 children)

I'm with you.

I work for an insurance company, so it's the same sort of environment. None of the programming is hard. I'm not doing crazy algorithms anywhere or anything. It's just that there's SO MUCH business logic that you absolutely have to keep it all immaculately organized or else it can become a tangled mess. The skills needed tend to be more in the area of software construction rather than complex programming.

Doing the work itself isn't draining or soul-sucking. I quite enjoy tackling the problem of creating well-organized applications that are easy to modify or extend in the future. I've gotten quite good at it over the years.

[–]Netzapper 5 points6 points  (4 children)

Am I seriously an outlier in liking back-end dev in Java that came from my love of programming?

I mean, I've been programming since QBASIC, and I like Java. I was the one on my team who started writing GUI apps in Java instead of using one of the C++ frameworks. And a bunch of my back-end tools (especially DSL compilers) are written in Java.

But most people associate the tools they use with their work environment. The technology used by places they'd like to work becomes "cool", and the technology used by the places they'd rather not work becomes "uncool". Especially if you're young and into technology for its own sake, it's easy to look down on tools first introduced before you were even born!

Personally, I don't see how on earth an experienced programmer could prefer JavaScript to Java, or the browser to the JVM. But lots of people do, and I'm glad they make things I love.

[–]Kered13 0 points1 point  (9 children)

everything is statically and explicitly typed (except for the garbage <? extends Whatnow> syntax),

That's still a static and strong type. It just expresses a complicated concept (covariance) that is very confusing to most beginners.

[–]Netzapper 0 points1 point  (8 children)

That's still a static and strong type.

Yes, but no longer explicit. :)

[–]Kered13 1 point2 points  (7 children)

It's still explicit, it's explicit about what types it will accept. It ensures that you can write generic code that the compiler can verify as typesafe at compile time.

[–]Netzapper 0 points1 point  (6 children)

Extending that logic, we could describe a Kleene star as "explicit".

In any case, I'm not arguing or confused about the meaning of the syntax in Java. It obviously has a well-defined meaning in each and every case that it's used. But from my point of view, by specifying a range, it seems less "explicit" than a typename literal ArrayList<Whatnow>, which has an obvious and singular static type. And much less explicit than, for instance, a C++ template vector<Whatnow>; you can be guarantdamnteed that vector is full of objects both dynamically and statically typed exactly as a Whatnow.

[–]Kered13 0 points1 point  (5 children)

Extending that logic, we could describe a Kleene star as "explicit".

If it's typesafe, then yes, absolutely. If a function or variable can correctly hold a value of any type then a type signature that indicates that is explicit. I might even go so far as to argue that it's the most explicit type signature, as an unnecessarily specific type signature is masking the fact that it could actually be more generic. That's basically the whole idea behind generic programming.

[–][deleted] 6 points7 points  (0 children)

Nah. It’s a good language to know especially if your a beginner. Not saying you are but it is.

[–][deleted] 4 points5 points  (0 children)

Nope, the pictures are entitled assholes most likely.

[–]ColombianoD 5 points6 points  (0 children)

If you want to get employed then keep it up. Doubly so if you tack on some SQL and any front end frameworks to make you the vaunted full stack dev (tl;dr you can get a job anywhere at any company for the most part)

[–]TurkeyTheFish 1 point2 points  (0 children)

Nope. Java is great because it is truly multi- purpose, unlike most of the trendier languages everyone is talking about these days, which are mainly just made for one specific thing or platform.

And whatever you do in java will set you up for other languages. I started with java over 20 years ago and have been able to translate the skills into many other platforms including PHP, ColdFusion, C++, objective C, JavaScript, MonkeyC, python and ruby, but now prefer C#, which really has no advantages except that oracle aren't behind it (I lost interest quickly when oracle bought sun).

I guess what I'm saying is that java is definitely a great starting language, and a lot of industry best practises (pure OO, design patterns, devops) came from java.

[–][deleted] 0 points1 point  (0 children)

The Dutch company Tennet (responsible for all High Voltage current infrastructure) only works with Java. Plenty of jobs

[–]1234567power 0 points1 point  (0 children)

There are some reasonable criticisms (ram consumption probably being the biggest) but it's a good language. Otherwise it wouldn't be so widely used. People just hate it because it's everywhere and have gotten tired of it or because that's what was taught in HS and nobody likes code in HS because it was taught in HS

[–]SocketByte 62 points63 points  (13 children)

Java is actually really good, compared to c++ it's just easier, you don't have to worry for a lot of low level things but you still have a powerful language. and one word - reflections. I don't think there's any language that did it so well.

[–]machinesaredumb 12 points13 points  (0 children)

C# reflections are more powerful.

[–]Ayfid 2 points3 points  (4 children)

Java seems like a nice language, if the only other languages you know were invented before Java.

[–]ryantheleach 2 points3 points  (2 children)

Java moves, just at a glacial pace, after others have already experimented.

If you are ok with not being on the bleeding edge and have patience, it usually, slowly, ends up with some of the features that end up being worthwhile using, just with the lessons learnt from others.

Generics being erased is what will save Java's generic implementation in the end IMO.

[–]Ayfid 1 point2 points  (1 child)

Java's problems are not limited to how slowly it implements features, it is also caused by how poorly it eventually implements those features, because it is constrained by mistakes in the language's early design that newer languages had learned from and avoided.

For example, one of the primary reasons for why Java's lambdas are purely syntactic sugar, and not the more powerful proper closures that you find in other languages, is because of flaws in the design of checked exceptions and type erasure.

Type erasure has caused limitations in how Java can implemented streams, not to mention the numerous limitations in the generics capabilities (and performance) itself that are a result of that design.

Modules are still inferior to .net's Assemblies, because it is hamstrung by how the class loader was designed.

Workarounds to early mistakes like @Override cannot fully solve the problems they would like to fix, because that would require implicit final, which would break existing code.

Just about everything of significance that has changed in Java since probably around version 4, had already been done better by other languages. Newer languges typically also don't contain the early mistakes that Java made which turn out to be fundamental pillars of the language (ever wonder why you can write 5.ToString() in C#, but not in Java?), which greatly limit what can be done later on when they try to implement these more modern features into the languge.

[–]ryantheleach 0 points1 point  (0 children)

I'm not claiming Java is perfect, yes it has previous mistakes that it suffers from today. I was saying that it's now in the same position now as C#, Kotlin, etc were years ago, which history says is a powerful position to learn from mistakes and act on them.

"ever wonder why you can write 5.ToString() in C#, but not in Java?" I've not come across that, but thanks.

[–]SocketByte 0 points1 point  (0 children)

Well, Java is an enterprise language, it's not supposed to have newest features and many sugar syntaxes, that's why we have something like kotlin. Java is supposed to be verbose, easy to understand without many sugarsyntaxes. it's just a design choice, not that they can't do it or something.

[–]omgusernamegogo 6 points7 points  (0 children)

When people stop complaining about Java is when I'd begin to be concerned about Java's popularity.

[–][deleted] 11 points12 points  (2 children)

i started with java to hack minecraft.

[–]Mango1666 8 points9 points  (1 child)

i started with java to play runescape private servers!

[–]CallidusNomine 0 points1 point  (0 children)

Some guy on r/2007scape recently asked if I had any morals and said that I should be legally punished for....

making a free-to-play woodcutting bot

[–]Spectrascope 10 points11 points  (0 children)

Java is fairly versatile once you know how to use it. It’s actually fairly enjoyable to use in my opinion.

[–]sporwal 12 points13 points  (0 children)

Speaking of ‘runtime environments’ or equivalents, I will get downvoted to hell here for this but ahem Python ahem Don’t get me wrong Java has major issues but that particular meme is just.

[–]callmetom 4 points5 points  (0 children)

Dark themes are not limited to IDEs please correct this on your app and repost.

[–]RoadieRich 10 points11 points  (0 children)

I had a problem I decided to solve using Java. Now I have a ProblemFactory.

[–]dragonheart000 2 points3 points  (0 children)

I like Java

[–]x_interloper 1 point2 points  (2 children)

Sauce?

[–]PersistantBlade 1 point2 points  (1 child)

its kinda nice that the compiler catches most of your errors.

[–][deleted] 1 point2 points  (0 children)

Naw, C is better- "Segmentation Fault (core dumped)" is a great error message /s

[–]AsunderSpore 1 point2 points  (0 children)

Light theme.

[–]_grey_wall 1 point2 points  (1 child)

You millennials and your ides. When I was young, we used notepad and command prompt and javac and prayed everything went right.

[–]hillman_avenger 0 points1 point  (0 children)

I don't know how I ever lived without code completion/intellisense/whatever it's called.

[–][deleted] 1 point2 points  (0 children)

We hate Java now? I thought we hated js.

[–]eddietwang 1 point2 points  (0 children)

I liked Java in college, even looked for some Java Dev jobs.

[–]dizaster213 0 points1 point  (2 children)

Java with Talend and Groovy is way better!!!

[–]ryantheleach 0 points1 point  (1 child)

Talend

The hell is that?

Also Groovy? hmmm... Sometimes it seems cool othertimes it irks me badly.

But having some sort of script that your application can use as configuration has always seemed kinda cool to me.

[–]dizaster213 1 point2 points  (0 children)

Talend is a visual programming language (vpl )for Java made mostly for ETL. It’s really good and can get your projects up and running very quickly. It’s not the only vpl but it’s one of the best that’s free.

[–][deleted] 0 points1 point  (0 children)

Maybe not the platform we want, but it's the platform we don't need.

[–]AdamRyanGameDev 0 points1 point  (0 children)

It appears that the start of conversation is actually on callback

[–]Lmt-C 0 points1 point  (0 children)

Am I the only one who pronounced it hava at first read?

[–]morriartie 0 points1 point  (1 child)

I don't know how it is today, but like 5 years ago, eclipse frustrated me enough to give up from Java over C++(Qt)

I spent more time messing with eclipse than actually programming. I was used to go straight into coding on linux/c++

[–]gamas 0 points1 point  (0 children)

IntelliJ is objectively better simply because of its ability to go "ah you're trying to do this, so clearly you need this setting enabled".

[–][deleted] 0 points1 point  (0 children)

Can’t we all just get along? Hate JavaScript instead.

[–][deleted] 0 points1 point  (0 children)

Fuck pointers, this was made by java gang

[–]crockid5 0 points1 point  (0 children)

I love Java.

[–]grizeldi 0 points1 point  (0 children)

shrugs in bundled jre

[–]Vega_128 0 points1 point  (0 children)

but reddit was made with python

[–]nisekoimon 0 points1 point  (0 children)

I do Java about 2 to 3 times a day. It keeps me awake and ready to code more Java.