• Welcome to Valhalla Legends Archive.
 

Java 1.5

Started by Tuberload, May 18, 2004, 05:07 PM

Previous topic - Next topic

Tuberload

I have read a lot about the new version and see things I like (such as generics), but haven't migrated because of fear of change. :-\

I was just curious if any of you have upgraded, and what your thoughts on it are?
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Tuberload

QuoteOne interesting feature of the beta is the ability to choose whether or not to use the new 1.5 features. When compiling your code, you have to explicitly state that you want the Java compiler to use the new 1.5 features. You do this with the following syntax:


javac source 1.5 YourClassName.java

I found this in an article I just read, and it is nice to hear. I will be upgrading now, and will post more about it later.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

iago

Good plan, I'm the same way.  I don't want to change :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


MyndFyre

Looking through the spec, I see:

Quote
Autoboxing/Unboxing
This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer). Refer to JSR 201 .

I say, boo!  Primitive types -- value types -- should be able to have methods called on them directly without worrying about a reference type wrapper.  Boxing wastes memory and ticks.

The enumeration addition copies exactly the way enums function in C#.  :P

I like the moves that Java is making, though.  It's almost becoming useful.  :P
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Hostile

I've been familiarizing myself with the new features since the beta pre-releases of it but even with final versions out i never end up making much use of the new API until its integrated in the products I use with it. Like WebLogic.
- Hostile is sexy.

Tuberload

Quote from: Myndfyre on May 18, 2004, 07:40 PM
Looking through the spec, I see:

Quote
Autoboxing/Unboxing
This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer). Refer to JSR 201 .

I say, boo!  Primitive types -- value types -- should be able to have methods called on them directly without worrying about a reference type wrapper.  Boxing wastes memory and ticks.

The enumeration addition copies exactly the way enums function in C#.  :P

I like the moves that Java is making, though.  It's almost becoming useful.  :P

Good thing your opinion doesn't matter. :P JK
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Banana fanna fo fanna

java is way too verbose imo. it's getting better with 1.5, but still not enough.

Dark-Feanor

I believe that 1.5 is still beta.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

MyndFyre

#8
Quote from: St0rm.iD on May 19, 2004, 02:09 PM
java is way too verbose imo. it's getting better with 1.5, but still not enough.

I now understand why you disdain VB.  As I have been working on an extremely simple sample VB .NET bot using my API, I have discovered that it uses a lot to say a little.

What I say in VB .NET:

For i As Integer = 0 to someArray.Length Step 2
 ' blah
Next

I can do in C#:

for (int i = 0; i < someArray.Length; i+=2) {
}


Even better are function declarations, with attributes:
C#:

[STAThread()]
public static int Main(string[] args) {
}

Note the line-continuation marker after the attribute declaration (I don't know why they decided on that, but it's gay).
VB:

<System.STAThread()>_
Public Shared Function Main(ByVal args() As String) As Integer

End Function


Eck.

Anyway, off-topic, of course.  This all gets around to -- why is it you think Java is verbose?  I would tend to disagree -- in fact, I think it's relatively concise.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Tuberload

Quote from: Myndfyre on May 19, 2004, 07:16 PM
Anyway, off-topic, of course.  This all gets around to -- why is it you think Java is verbose?  I would tend to disagree -- in fact, I think it's relatively concise.

I agree with you about it being concise, but when compared to languages like Python, and Scheme which storm talks about it does require a lot more typing.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Banana fanna fo fanna

After much exploration into other languages, I've decided operator overloading is a must. Makes things so much easier and concise.

Plus, Java is a dynamic language in a static world. It needs eval()!

Tuberload

Quote from: St0rm.iD on May 19, 2004, 08:17 PM
After much exploration into other languages, I've decided operator overloading is a must. Makes things so much easier and concise.

Plus, Java is a dynamic language in a static world. It needs eval()!

I would like to see operator overloading, but I don't mind the dynamic nature of Java. Besides, I could just write my own eval() method.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

MyndFyre

Quote from: St0rm.iD on May 19, 2004, 08:17 PM
After much exploration into other languages, I've decided operator overloading is a must. Makes things so much easier and concise.

Plus, Java is a dynamic language in a static world. It needs eval()!

I agree, I like operator overloading in C#.  :)

I remember when I first started programming in C# (I stepped up from Javascript).  I referenced the JScript .NET assemblies in my project, just so I could use the eval() function.  Now I say, "run away!  run away!"
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Hostile

#13
- Hostile is sexy.

iago

I disagree - I *hate* operator overloading.  It makes things happen that shouldn't happen which just confuses things.

std::string a ="123test" + 3;
That should make a point to the character array "test", and it's impossible to figure out what's going on without the documentation because of the two overloads (= and +).
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*