Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

261–270 of 327 posts

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#261

Earlier quoted context omitted.

Doesn't C# have "magic" getters and setters, where code like "foo.bar = quux;" might mean a function call? To me, that's not clearer at all.

I've written a lot of C# and Java (and others of course). It's really not an issue. If you're doing something expensive in a property getter or setter you're doing it wrong. If the function call doesn't get inlined and becomes a bottleneck in some tight loop you can just change it. Anecdotally, I have yet to see this occur in practice. Also, as the guy below me pointed out, by convention you know that Foo is a proper…

Exactly. It's (at least from what I've seen/read) common convention to make sure that getters/setters should be quick and have minimal side effects.

Your application shouldn't hang from a database call when you pull a property from an object. And obviously, methods doing such things should be documented appropriately.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#262
post #122
post #43

I'm surprised nobody has mentioned Android yet. When you add in the Android factor, Java is probably still one of the most widely used programming languages today. It's funny the article straight away brings up the verbosity argument as well. You want to talk about verbosity - take a look at Objective-C and Cocoa (again, hugely popular today!)! Personally, I quite like Java.

> I'm surprised nobody has mentioned Android yet. When you add in the Android factor, Java is probably still one of the most widely used programming languages today. Except that Oracle was right into suing Google, after all. Google hasn't improved the language level beyond Java 6 grammar. So nowadays one is forced to write in Java 6 when targeting Android, which is really a pain, specially when writing libraries. Thi…

You have cause and effect backward. Oracle created a hostile environment for developing Java as an Android language.

Secondly, Android's base classes and AIDL are a significant advance in Java.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#263
post #180

Java may not be dying, but it does take off early on Fridays for golf. Java is not dying the same way Cobol was not dying 10 years ago. It has a lot of legs left but nobody is 'hoping' to use it, they are told to do so. Java is and always has been almost completely a corporate tool. Again, like Cobol, so the 'cool kids' are not going to give it much love. It's too slow to execute to compete with C++, its too slow to…

Well, yes and no. I'm old enough to remember when Java was launched, and I was getting paid to write Java in '96. At the time it was going to be a whole new way to write software - modular software made of components downloaded on the fly whenever you needed them. That is why package names work like that , com.sun.java.blah meant a class called Blah that you would grab from the server java.sun.com when you first inst…

Don't get me wrong, the guys at Sun were quality geeks, and they never set out to create the Corporate Back End Language of record. But that's how it gained its huge head of steam.

Another reason I failed to mention that Java is in decline is that the geek / utility-driven folks at Sun had essentially said "Java is a mature language now" and were focusing on other languages for the platform. Then the sales and marketing people at Oracle got involved and realized that was not the best way to bilk their existing customers.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#264
post #80

Earlier quoted context omitted.

> So, how again can something written in C perform faster than...something written in C? Easy. JVM has runtime information it can use that C compiler simply doesn't have. There are some synthetic benchmarks that show how "java is faster than C".

You're wrong. http://en.wikipedia.org/wiki/Profile-guided_optimization The method for C/C++ is just different to JIT. Compile program, collect profile information, optimize program guided by profile information.

There's far more than branch prediction optimization, which AFAIK, is bread and butter of profile-guided optimization.

Even that assumes that your program does not significantly shift its behavior mid-execution--in fact, you're optimizing for the average, not the current case.

One of the coolest JIT things is ability to inline virtual calls. Think about that, I could have my code calling a 3rd party library calling another 3rd party library thru 10 levels of stack and if all that call ever returns is "false", then JIT will optimize right through all that.

I don't believe PGO does virtual call inlining. That's a C++ nonstarter. In C, the equivalent would be inlining for function pointer calls.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#266
post #8
post #3

Any talk of Java "dying" is just nonsensical Java hands down is the most obvious choice for any applications that require performance, yet are too complicated to write and support in C/C++/other lower level languages. Java JIT is very mature unlike JITs for most other languages, which largely remain at the level of experimental projects and fall short on key production requirements. Given that the entire Hadoop ecosy…

Yes, that's why kernels are written in java. If you're writing complex code java is rarely the answer as it requires so much complexity itself. Hint: Most java projects just appear to be complex because of the poor quality of the language (and developers). Java is hands down the choice for simple projects written by way too many poor quality developers. The JVM can barely manage 12 GB of memory, Java is a piece of cr…

I'd like to see any language withstand the combination of big project, lots of managers, mixed levels of experience and expertise on the team, and over-reliance on structure and methodology versus having the right people. It just happens that Java gets picked for those kinds of projects.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#267
post #225

Earlier quoted context omitted.

Well, there are programming languages and then there are conventions. I think a programming language is more like an alphabet, and programming conventions are the real languages. I can scroll through code at high speed and understand it at a mere glance once I "get" both the language and the convention that was used (if only the doc and comments didn't get in the way all the freaking time...) Things that feel out of…

> Well, there are programming languages and then there are conventions. I think a programming language is more like an alphabet, and programming conventions are the real languages. I like this. As a thought experiment, consider the idea of transforming a convention into another "letter" in the alphabet. A simple example would be the natural numbers. If our alphabet is "a", then we can represent 1 as "a", 2 as "aa", 3…

>> fold () x it should be fold () 1 x or foldr1 () x or foldl1 () x of course according to Guy Steele, fodl and foldr are considered harmful :)

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#268
post #90
post #43

I'm surprised nobody has mentioned Android yet. When you add in the Android factor, Java is probably still one of the most widely used programming languages today. It's funny the article straight away brings up the verbosity argument as well. You want to talk about verbosity - take a look at Objective-C and Cocoa (again, hugely popular today!)! Personally, I quite like Java.

Popular in terms of use, yes, but liked? I don't know, I doubt it. Android and iOS essentially force you to use Java or Objective-C respectively. I don't hate Java, but I don't like it either. It lacks quality of life features that other, similar languages have had for years. I can't stand writing code in it if I don't have to (and don't get me started on Objective-C...) From what I hear from others and read on a wee…

"Android and iOS essentially force you to use Java or Objective-C respectively"

But the combination of iOS and Android gently pushes you in the Mono/F#/C# direction. Come to the light side!

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#269
post #174

Earlier quoted context omitted.

> Android ... essentially force you to use Java You can use many languages which compile down to Java Byte code.

>> Android ... essentially force you to use Java > You can use many languages which compile down to Java Byte code. And then you end up with subpar performance and application size :( I had high hopes for Mirah for Anrdoid development few years ago, but it unfortunately fade away. It was basically Ruby like language that compiled down to pure java bytecode without a need for any runtime. That would fit Android perfec…

Xtend, Haxe and Kotlin works just fine.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#270

Earlier quoted context omitted.

He didn't say anything about the validity of complaints.

In so many words he is saying: "People complain about my language, because they use it. If it wasn't good (enough) they would not have used it." Thus the complaints are relegated from feedback to proof that the choices made were right thus invalidating complaints.

So by not changing X they are automatically and implicitly disagreeing with any complaints referring to X? You're reaching.

EDIT: In case my point wasn't apparent, the language is under active development by an open, international standardisation committee, of which Stroustrup is an active and prominent member. They are well aware of the complaints, but the problem is that every change involves a tradeoff, and sometimes that tradeoff is just not worth it.

Post reply on HN