Search |
||
Have A HeartPosted by editor on November 27, 2007 at 7:50 AM PST
Help the beginners figure out autoboxing Sometimes the "Not-So-Stupid" question is a discussion-starter, with lots of ways the question can be answered. But other times, there really is something of a "correct" answer, and the existence of the question gets at the idea of why this answer isn't easier to find.Consider today's not-so-stupid question, presented as our Feature Article, (Not So) Stupid Questions 20: Primitives and Collections. It cites a Sun Java SE 5.0 page that says:
Yet, a simple 10-line program shows it's trivially easy to add
The seasoned developer knows that what's up is autoboxing, the automatic conversion by the compiler of integers to their primitive-wrapping object equivalents:
And maybe that's something to talk about, that this is a feature that directly addresses problems developers have had with previous versions of Java, without considering what it looks like to the new developer who comes to the language without that experience, without presumptions or biases. Maybe it doesn't make sense to fresh eyes like it does to anyone who's done it the hard way. The conservative "no more language changes" crowd may see this as a problem, but then again, is autoboxing really unintuitive? Isn't the point to do what you would expect Hmmm... maybe not a stupid question at all... In today's Weblogs, David Herron asks What is Needed for the Next Level of Internet Applications? "My point is that one can only go so far in application features using an application development framework hosted inside a web browser. Stagnation in browsers, as Ian put it, means application developers have had stagnancy in the capabilities they could code into their applications." Scott Oaks crunches the story behind the numbers in A scalable SPECjAppServer 2004 submission. "Sun has submitted a SPECjAppServer 2004 submission that scales across a lot of hardware. Is it just a question of throwing hardware at the problem?" Finally, Sahoo offers A javac plugin to manage your persistence.xml. "In this article, I talk about a Java compiler plugin that can create the persistence.xml file for you automatically during normal course of Java code compilation and show how easy it is to use in your existing build scripts - be it maven or ant or shell script." In Java Today, The Aquarium notes, "the most recent episode of the GlassFish Podcast is an interview about Hudson with Kohsuke. Listen to find out how Kohsuke's laziness is what made the project happen..." Also if you're using or simply interested in Hudson, the next GlassFish v3 Brown Bag is focusing on Hudson (Tues, Dec 4th : 9am - 10:30am PST). These are conference calls open to the entire GlassFish community. Previous topics covered (Subversion & Maven2) have slides and audio available. Last week, Neal Gafter discussed the possibility of adding "extension methods" in Java 7, which allow a user to add a method to an interface or class that you don't control. In his blog Extension methods, Stephen Colebourne offers some ideas on alternative syntax for the feature. "My proposal is that the freedom given to the user by the use-site approach is far more desirable, but the possible side-effects are nasty. My preference would be to add a visible marker to show that this isn't a regular method." A new Artima article covers a JavaZone presentation in which Matt Raible Compares Six Java Web Frameworks. "Matt Raible's presentation comparing six Java Web frameworks is now available online in a video format. The talk, given at the JavaZone conference in Oslo earlier this fall, compares JSF, Spring/MVC, Stripes, Struts 2, Tapestry, and Wicket. Raible also has updated presentation slides that include GWT, Seam, and Flex in the comparison as well." The video of the presentation is available from the Belgian JUG's PARLEYS.com site.
In today's Forums,
Current and upcoming Java Events :
Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site. Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive. Help the beginners figure out autoboxing »
Comments
Comments are listed in date ascending order (oldest first)
|
||
|