ADTs

nkuipers nkuipers at uvic.ca
Tue Mar 4 13:40:29 CST 2003


Hello,

So I'm taking this course in data structures in Java.  For example, a java 
sequence inherits from vectors and lists, and iterators extend positions.  
Since my first language is Perl, this naturally has me thinking about ADTs in 
Perl.  I looked around CPAN for "ADT" and "List" and "Vector" and such, and 
was surprised at the apparent lack of Perl representations of such constructs.
 The closest thing I found was Class::Struct.  Now, I fully realize that 
between hashes and arrays, and the rich set of Perl built-ins (like splice), 
there isn't really a *need* for CPAN modular definitions of doubly linked 
lists and so forth.  But what if I don't want to program with fundamental 
types yet stick with Perl?  These abstractions make for easy programming and 
self-documenting code (at least for a maintainer or someone not too familiar 
with Perl), and I'm curious if I missed something on CPAN or if this simply 
isn't a Perl thing to do.  Perl includes the fundamental data types scalar, 
array, and hash, would it be appropriate to also include a selection of ADTs?

Cheers all,

nathanael




More information about the Victoria-pm mailing list