4 ms·
> Why not? If a language's goal is to be practical (as is Clojure's), then it should take practical concerns into consideration. This is something that the Java
by bsder 10y ago
> Why not? If a language's goal is to be practical (as is Clojure's), then it should take practical concerns into consideration. This is something that the Java community definitely gets right.
AHAHAHAHAHAHAHAHAHAHAHAHAHA!
Java getting practical considerations right. Oh, I so needed a good laugh.
Let's start from the basic:
No unsigned type. Bit/byte manipulation code written in Java is garbage when written by experienced programmers. When written by inexperienced programmers it's a nightmare.
Ever looked at the "class pyramid" monstrosities in Java? That includes the two primary GUI systems.
Ever debugged all the stuff coming from the type erasure that you are stuck with doing in Java?
And, let's not even gets started on the people who think they can write concurrent code (Hint: if your Java concurrency solution doesn't involve java.util.concurrent-you're doing it wrong.)
While Java gets many things right, it's ability to prevent people from falling into pitfall after pitfall is NOT one of them.
I would argue Clojure does a much better job at this simply by the fact that immutability is much more of a default choice.
- sqeaky 10y agoWhy do people here try so hard to be condescending sometimes? Laughing and mocking does not help when prior to it others tried to provide earnest replies, based on experience and presumably reality. Please save the vitriol for arguing with those reason does not work on. Your points do have merits in showing Java is imperfect. I would even say that it is deeply flawed. I would not agree it is impractical. The simple fact about the practicality of Java can be shown in the millions and millions of lines of code powering much of the boring business infrastructure in the United States. If Java disappeared overnight Banks, Insurance companies and much of the rest of the financial sector wouldn't open the following morning (And then we look at our phones).
- Jach 10y agoThe same would happen for COBOL. That alone doesn't make it practical or show its practicality, it only shows that it has actually been used in critical systems, apparently with some success. Many programming languages can claim that. Honestly had the same reaction as above. It's a hilarious laughable claim that the Java community gets this nebulous "practical concerns" thing right. Agree it's not a helpful response here but I don't blame them for falling to it. It's not exactly "forced". Probably better for @shit_hn_says though. Edit: the much less nebulous claim by 'tlarkworthy is much better.
- sqeaky 10y agoSticking to the technical discussion. I agree that some businesses would have to close for Cobol. That number goes down each year, with Java it is still going up. I just the picked the financial sector because we all know about banks and most of us have insurance, so its visible. I also worked a contract at Nationwide (who could do limited business without Cobol, but not without Java) and got to see both in operation. There are many less visible things that would fail but could have more impact. Without Java the US military is in trouble, a majority of cell phones stop working, the printer in the office I am now fails, Netflix has some level of problems and more and more... It is debatable that Java is the single most widely deployed programming languages. I say debatable, because many of those JVMs were written in C and many of the kernels (when they need a kernel) JVMS run on are written in C, where do we draw that line. If Java were not practical this would not have been possible. I suspect it would have looked more like Cobol, with shops of experts being able to run and maintain it, but failing and migrating away as time went on.
- Jach 10y agoThere's not much technical discussion to be had when our views of practicality are so different, and practicality itself so subjective and context-dependent. If Java starts to smell like COBOL across the wider industry (not just HN types) will it no longer be practical, because it no longer satisfies the narrow criteria "has been deployed in critical applications and is not being migrated away from"[0]? What about the great tooling/perf/backwards compatibility/ecosystem mentioned, do those not matter at all for practicality concerns? I'm not sure. Maybe we'll just agree that practicality is a low bar to satisfy and shouldn't be a high concern for much? Reminds me of the discussions around WorseIsBetter, and a quote from Wayne Mack[1]. [0] I've heard from COBOL forums that the amount of new COBOL written each day and existing in the world keeps increasing; they've even got Object-Oriented COBOL now. I don't think it's unreasonable to assume that if COBOL had the same market pressures Java does (plus university pressure) and if the world was basically stuck with it in the same way we've had Java this century that we wouldn't be able to push it to service our needs. [1] http://wiki.c2.com/?TheSourceCodeIsTheDesign http://wiki.c2.com/?TheSourceCodeIsTheDesign "I believe it is time to explicitly state the long held secret of software, we do not need to do design; design is ineffective and costly."
- bsder 10y agoIf you follow upthread, cle asserted was that a language should be held responsible for being able to be misused badly. And then asserted Java as a counterexample that is better about this. I'm sorry, but anyone who has had even tangential exposure to Java codebases would find this equally laughable. Java codebases are by far the worst codebases I have ever had to wade through. They even surpass C++, and I loathe C++. I presume it's the fact that you can cut/paste StackOverflow until something works in Java while C/C++ blows your foot off a lot earlier. To be fair, I have not had to wade through large COBOL or assembly codebases, so my experience may be skewed.
- tlarkworthy 10y agoThose are snooty language level criticisms, pragmatists care about tooling, performace, talent acquisition, backwards compatibility and ecosystem. All of which Java is pretty stellar at.
- deleted 10y ago[deleted]
- bsder 10y agoAnd yet people with the capability to think about whether or not to use Java (as opposed to having it pushed on them from above) seem to choose anything else unless they have very specific circumstances. And, if I prioritize your list, I arrive at C#/CLR, not Java/JVM.
- lemming 10y agoHint: if your Java concurrency solution doesn't involve java.util.concurrent-you're doing it wrong. Of course pretty much everyone's concurrency solutions do involve j.u.c since Java 5. They are truly powerful language facilities.
- bsder 10y agoGee, so why do I STILL see so many programmers writing "synchronized" all over their Java or Android code? I wish I were joking. HN is not like the real world. This is just like "git/hg is superior" arguments. Those of us in the real world are still happy when we see a business actually use source control of any form.
- lemming 10y agoUsing synchronised and j.u.c aren't mutually incompatible. It's quite easy to use synchronised to conservatively control access to the state of a single object, and often that's all you need. It can affect performance depending on your access patterns, but it's not like synchronised is deprecated or anything. When was the last time you saw wait/notify? I'm willing to bet that was a long time ago.
- dang 10y ago> AHAHAHAHAHAHAHAHAHAHAHAHAHA! Java getting practical considerations right. Oh, I so needed a good laugh. Please don't post like this here. It degrades the community, takes threads into flamewars, and discredits what you're arguing for. We detached this subthread from https://news.ycombinator.com/item?id=14008093 https://news.ycombinator.com/item?id=14008093.