Link Details

Link 109580 thumbnail
User 214988 avatar

By puredanger
via sdtimes.com
Published: Sep 02 2008 / 09:31

The upcoming Java 7 shows all the signs of being a major release, on the order of Java 5. It has numerous features that will make Java easier to develop with, and that will lead to cleaner, better code. Let’s look at some of them.
  • 22
  • 7
  • 3325
  • 1767

Comments

Add your comment
User 281050 avatar

cbang replied ago:

0 votes Vote down Vote up Reply

Ehmm yes ok that's all nice and we've heard it before, but when will we actually see a language JSR? Java 6 took 18 months from JSR to realization and it didn't even have any language changes.

User 116586 avatar

Jacek replied ago:

1 votes Vote down Vote up Reply

No closures???? After all these years of discussions, still no closures???? Unbelievable.

User 254602 avatar

Nick Brown replied ago:

0 votes Vote down Vote up Reply

That surprised me as well. When was that announced? Last I heard Gafter had finished the BGGA prototype, so I thought they were pretty close to something.

User 205784 avatar

cbegin replied ago:

0 votes Vote down Vote up Reply

Anyone else wonder how someone can say this: "The upcoming Java 7 [...] has numerous features that will make Java easier to develop with", and then this: OSGi, ForkJoinExecutor, asynchronous I/O, and invokedynamic bytecode.

How about just a simple multi-line string? That would make Java easier to develop with. Sun and the JCP need fewer engineers focused on building app servers and making themselves sound smart, and look for more application developers who understand the real issues Java is facing.

User 281050 avatar

cbang replied ago:

0 votes Vote down Vote up Reply

You're spot on about that. Ok so SUN never did grok what KISS is about but still, with all the emerging languages one would think there's basis for some NIH coming to the average corporate developer (and please, no more misuse of annotations, fix the language instead!).

User 254602 avatar

Nick Brown replied ago:

2 votes Vote down Vote up Reply

Isn't that possible with the + operator?
String aVeryLongString = "This is a very, very, very " +
"very long string";
And before you say something along the lines of wasting memory by creating multiple strings, the compiler is smart enough to combine them into one at compile time.

User 281050 avatar

cbang replied ago:

0 votes Vote down Vote up Reply

Umm have you ever tried working with JPQL, embedded SQL or any other DSL buried in String tokens? Copying and pasting between the IDE and a database tool? Then I think you would understand.

User 205784 avatar

cbegin replied ago:

1 votes Vote down Vote up Reply

That's not a multi-line string. That's multiple strings. Big difference. I recommend trying out a few other languages, C#, Ruby, anything. Not to replace Java, but learning them will make you a better Java developer. If you can't think of 10 ways to make Java a better programming language, then you're living in a pretty stale and constrained box. Your 10 ways don't have to be the same as mine, but you should be able to see at least 10 things you would change about any programming language that you use. I can think of 10 that don't even require JVM changes.

User 254602 avatar

Nick Brown replied ago:

0 votes Vote down Vote up Reply

"That's not a multi-line string. That's multiple strings."
Not as far as the compiler is concerned. It considers it a single string. What exactly is the problem you are trying to solve here? If it is something other than wanting to be able to create long strings without being constrained to a single line, please elaborate as that is the problem I usually hear when people mention a desire for "multi-line strings".

"I recommend trying out a few other languages, C#, Ruby, anything. Not to replace Java, but learning them will make you a better Java developer. If you can't think of 10 ways to make Java a better programming language, then you're living in a pretty stale and constrained box."
I've studied plenty of other languages and can think of dozens of improvements that could be made for Java. But being able to write long Strings on multiple lines is not one of them.

User 205784 avatar

cbegin replied ago:

0 votes Vote down Vote up Reply

>>Not as far as the compiler is concerned

This is not a compiler issue. Nobody is talking about performance here. It's a human issue. Code readability is the subject.

cbang already elaborated here. If you can't see the problem with using string concatenation as a solution, then I'm sorry. You're a different kind of developer from those that I've known. None that I've known would prefer Java's approach.

#Ruby

User 205784 avatar

cbegin replied ago:

0 votes Vote down Vote up Reply

DZone deleted my examples... you'll have to enlighten yourself with Google searches.

User 204561 avatar

Ignacio Coloma replied ago:

0 votes Vote down Vote up Reply

Nick, when writing even the simplest SQL code into java, you will end up copying the strings from your SQL tool of choice and spend the next ten minutes formatting into the multistring thing (putting " + in place, indenting, etc). What they are asking is that the compiler does all the work.

It only happens if you work with big strings, but when it does, it's a major issue.

User 257983 avatar

samizaka replied ago:

0 votes Vote down Vote up Reply

I agree with cbegin ...

Furthermore, I can't see the positive aspect when Sun releases three versions of Java in 5 years ...

User 116586 avatar

Jacek replied ago:

0 votes Vote down Vote up Reply

Ah yes, multi-line string...what I would do for that...
,

User 186901 avatar

kenallen999 replied ago:

0 votes Vote down Vote up Reply

Maybe it is time to stop complaining and start changing the language

User 186901 avatar

kenallen999 replied ago:

0 votes Vote down Vote up Reply

anyone for 'T'

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.