
-----------------------------------
wtd
Mon Feb 09, 2004 11:54 am

Java 1.5 Beta Surfaces
-----------------------------------
http://java.sun.com/developer/technicalArticles/releases/j2se15/

The article describes the changes better than I can.  Enjoy.

But I can't resist throwing out an example (astute Java programmers should notice a number of new things):

import java.lang.*;
import java.util.*;

class Test {
   public static int add(int ... args) {
      int output = 0;
      for (int i : args) output += i;
      return output;
   }
   public static void main(String

-----------------------------------
rizzix
Mon Feb 09, 2004 4:40 pm


-----------------------------------
yes 1.5 is very exciting!!

i'll be modifying my bot code as soon as the release version of 1.5 is released.

i think the most exciting feature are the variable args, the enhanced for loop and auto-boxing.

-----------------------------------
wtd
Tue Feb 10, 2004 7:44 pm


-----------------------------------
i think the most exciting feature are the variable args, the enhanced for loop and auto-boxing.

It's all exciting.  

You left off generics, which mean no casting... or exceptions related to that.  The only thing I'd like from Nice (a language that compiles to JVM bytecode) is the functional side of things, like the ability to create anonymous functions/methods, and and the ability to simplify function syntax.

int add(int a, int b) = a + b;

Of course, then I'd also like the ability to simplify parameters...

-- in Eiffel
feature { ANY }
   add_four_integers(a, b, c, d : INTEGER): INTEGER is
      do
         Result := a + b + c + d
      end
