"Syntactic sugar." With the exception of generics, all the the syntax enhancements in JDK 1.5 are just easier ways to write things that you could always do. People like the foreach construct, they find manually converting between primatives and Objects to be a nuisance, etc. Same thing here. As the blog talks about, there's no difference between the new way and the old in how it's actually run. It's just a matter of what the compiler will do for you. In short, if you don't want to do it the new way, don't. But some of it's nicer (or at least prettier) for many people.
-----Original Message----- From: Raymond DeCampo [mailto:[EMAIL PROTECTED] Sent: Friday, July 04, 2003 6:18 PM To: Log4J Developers List Subject: Re: Varargs in JDK 1.5 will help loggers (a bit) Nicola Ken Barozzi wrote: > > With Java 1.5, AKA Tiger, Java will get varargs support, which means > that methods can have a variable number of parameters. > > Imagine > > log("The error", a, c, exception, f[i]) > > Instead of > > log("The error "+ a + "\n"+ c + exception.toString + > String.valueOf(f[i])) > > @see http://www.madbean.com/blog/22/ > One could already accomplish the same thing with log(new Object[] {"The error ", a, "\n", c, exception, f[i]}); So what was the rationale behind introducing the new syntax? Ray --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]