Skip site navigation (1)Skip section navigation (2)
Date:      	Tue, 19 Nov 1996 13:00:26 +1100 (EST)
From:      "David L. Nugent" <davidn@blaze.net.au>
To:        Peter Bartlett <bartlett@Exabyte.COM>
Cc:        ejs@bfd.com, chat@freebsd.org
Subject:   Re: Who needs Perl?
Message-ID:  <Pine.LNX.3.95.961119125819.289B-100000@server.blaze.net.au>
In-Reply-To: <9611182009.AA05333@fern.Exabyte.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 18 Nov 1996, Peter Bartlett wrote:

> The thing that makes Perl nice is that it has a buit in "scalar" type that's
> used for just about everything.  So for example only a single hash function
> is needed.  The temptation with C++ is to write a hash table class that
> works for any data type; this requires that the user write a hash function
> for each base type to be hashed.  This is somewhat against the idea of
> trying to make using these data structures almost effortless.

? How so.

This is a perfect example of where inheritance may be useful. Write the
abstrct class for hashing, write some subclasses that implement the
hashing, and there you have it. For more exotic data types, of course the
user needs to write their own hash interface - that is only to be
expected.

> I guess this discussion has gone beyond the point where it has anything
> to do with FreeBSD...

:)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.961119125819.289B-100000>