Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

141–150 of 327 posts

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

#141

Earlier quoted context omitted.

What? C++ comes with robust trees & hashes via the STL, along with a pretty extensive library of algorithms that work on all the STL containers. And, unlike Java, C++ lets you pack value objects contiguously in memory, which can be a massive performance win due to better cache behavior/no pointer chasing.

And, unlike Java, C++ lets you pack value objects contiguously in memory, which can be a massive performance win due to better cache behavior/no pointer chasing. Certainly, and it is one of the features that I am often missing in Java. Rather than having an array of structs, you need to make n parallel arrays, where n is the number of struct fields. And sometimes such hacks are necessary to make things compact and fa…

For sure. Mixed value/reference semantics add a lot of complexity to C++.

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

#142

I am really sick of these articles. "Java is alive and well", "Brand new exciting things that tell you Java is still a leader" blah blah blah. To me Java is a great tool, the JVM an even better tool. No one said your favourite language is dying and if they did, they are naive. These articles only give me a small hint that you think java is dying and are trying to do your part to keep it alive. I guess what boils down…

I agree. It's link-bait, battling the other link-bait about how Java is dying and { x, y, z } is the #1 language, will dominate any day now, and anyone not coding in it is inferior.

Unfortunately, as technology has matured, it has become just as politicized and petty as anything mainstream. Countless people make their reputation and/or income writing blog posts and churned articles, living in the tech periphery like leeches, without creating any actual value. I think this is part of why I have so much nostalgia for the 80's and 90's.

Code in whatever makes your life least painful, and learn whatever's in demand for your desired career path.

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

#143

Earlier quoted context omitted.

You can get all of that and clearer writing in c#, with Intellisense.

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.

Yes. However, C# uses the convention that capitalized "fields" are actually properties, and lowercase ones are true fields.

For example, Foo.X might be an x position, returned from a getter method, and set with a setter method. Internally, the class make use the Foo.x field to store it, in which case the getter and setter are trivial. In fact, C# will write them for you The property could look like:

    int X{
        get;
        set;
    }
(Though my syntax might not be completely correct, I haven't used C# in a while). C# will automatically create a private field to store the value for x, and the getter and setter will work as expected.

Classes should, as a general rule, only expose properties and methods to the outside world. All fields should be private. Yes, accessing a property calls a method, but so does a Java getX().

Java uses the same rule, except getters and setters are implemented using setX(int) and getX(). C# properties are the equivalent. The client of a class should not care how the class stores values, but that the getters and setters work.

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

#144
post #122

Earlier quoted context omitted.

> 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…

> Google hasn't improved the language level beyond Java 6 grammar. That's because Oracle has been suing them over it. Dalvik hasn't changed in years thanks to that lawsuit. Google was steadily improving Dalvik right up until that lawsuit happened, then it came to a screeching halt. That's not a coincidence. And really, what Java 7 language level features were there that makes it problematic that Android still runs Ja…

> That's because Oracle has been suing them over it. ...

Sun just did not sue them, because they lacked the money. James Gosling confirmed this.

> And really, what Java 7 language level features were there that makes it problematic that Android still runs Java 6? The good stuff was dropped from 7 and pushed to 8. 7 is boring

- Strings in switch

- Try with resources

- Multiple exceptions in catch

- Simplified IO

- Diamond type inference

- invoke dynamic optimizations

Any Java library targeted for Java 7, even without the new language features, is also not usable in Android projects, because Dex cannot understand the new Java 7 bytecodes.

Google is a corporation like any other.

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

#145
post #102
post #79

Earlier quoted context omitted.

To be fair, Mono exists, and contains a free implementation of C#.

True, but you can't spruik that and then tell us in the next breath about the wonderful developer tools and Intellisense, etc., because most of that doesn't exist outside Windows. With Java it's not just the JVM that is cross platform - the whole developer ecosystem and culture is from the ground up. Every IDE, every compiler, every tool, all runs on every platform. It has it's holes, but largely Java actually achiev…

OT:, pardon this non-native, what does "spruik" mean? I can only find this[0] but it seems an intransitive verb compared to what you used

[0] http://dictionary.reference.com/browse/spruik

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

#146
post #144

Earlier quoted context omitted.

> Google hasn't improved the language level beyond Java 6 grammar. That's because Oracle has been suing them over it. Dalvik hasn't changed in years thanks to that lawsuit. Google was steadily improving Dalvik right up until that lawsuit happened, then it came to a screeching halt. That's not a coincidence. And really, what Java 7 language level features were there that makes it problematic that Android still runs Ja…

> That's because Oracle has been suing them over it. ... Sun just did not sue them, because they lacked the money. James Gosling confirmed this. > And really, what Java 7 language level features were there that makes it problematic that Android still runs Java 6? The good stuff was dropped from 7 and pushed to 8. 7 is boring - Strings in switch - Try with resources - Multiple exceptions in catch - Simplified IO - Dia…

http://www.wired.com/wiredenterprise/2012/04/schwartz/

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

#147
Dying? I don't know, but surely not dead.

But look at the beginning of Java, at that time it was "cool" and growing. Now Java is an adult and not cool, other languages grow, build new communities, new tools and new possibilites, that's why they offer more fun and many people think java is dying.

Java will be there for many many years, Cobol still there too ;-) But someday it will die, that's normal life.

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

#148
post #60

I've run the Java Users' Group in Philadelphia for almost 14 years, and I specialized in Java recruiting between 1999-2010. I know a lot of Java pros. Our meetings still get pretty strong attendance (80-120 per meeting), but I'm seeing far fewer new sign ups and the faces are much the same. There could be several reasons, but young engineers that I speak with rarely have any interest in Java work (though JVM is still…

I think interest overall in software development has plateau'd recently. I go to software events and think, "of five million people in the area, these are the fifty really interested in software development. Half are probably hobbyists, and the other half are probably already employed. A person that needs to hire a developer has big problems."

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

#149

Earlier quoted context omitted.

You can get all of that and clearer writing in c#, with Intellisense.

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 property.

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

#150
post #89
post #79

Earlier quoted context omitted.

To be fair, Mono exists, and contains a free implementation of C#.

MSFT could shut down Mono anytime it wants.How many business use mono (to build web apps) in production? Scala,Groovy,Xtend,etc... there is enough languages on the jvm one doesnt have to use any MS related tech.

How so? C# is a standardized language.
Post reply on HN