From owner-freebsd-java Wed Oct 4 14:16: 5 2000 Delivered-To: freebsd-java@freebsd.org Received: from ares.trc.adelaide.edu.au (ares.trc.adelaide.edu.au [129.127.246.5]) by hub.freebsd.org (Postfix) with ESMTP id B167737B502 for ; Wed, 4 Oct 2000 14:16:01 -0700 (PDT) Received: (from glewis@localhost) by ares.trc.adelaide.edu.au (8.9.3/8.9.3) id GAA27898; Thu, 5 Oct 2000 06:45:50 +0930 (CST) (envelope-from glewis) From: Greg Lewis Message-Id: <200010042115.GAA27898@ares.trc.adelaide.edu.au> Subject: Re: Sun Keynote at JavaCon2000 - C++ templates In-Reply-To: from Chris BeHanna at "Oct 4, 2000 11:58:30 am" To: behanna@zbzoom.net Date: Thu, 5 Oct 2000 06:45:50 +0930 (CST) Cc: FreeBSD-Java X-Mailer: ELM [version 2.4ME+ PL70 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Chris BeHanna wrote: > On Wed, 4 Oct 2000, Rob Furphy wrote: > > > I'm curious, what is it about C++ style templates that you feel will > > be good for java? > > (Anyone?) > > Type-safe collections, allowing compile-time type-checking. In > large C++ systems, huge numbers of potential errors are caught this > way. Better 100 compile-time errors than a single run-time > error--*especially* if that error is discovered after deployment! > > There are other uses; e.g., generic algorithms implemented in > template classes that again offer compile-time type checking, thereby > reducing the number of run-time type errors that you'd have to track > down. What he said :). Yay! I have definitely missed this feature in Java. Not only do you get the much improved compile time type safety Chris has mentioned above, there are also potential performance benefits. - Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message