algorithms and ADTs (was Re: efficient idiomatic queue?)

John Schmitt jschmitt at ati.com
Wed Jan 23 21:03:43 EST 2002


I was hoping that someone else would comment on this post and I'm counting
on people to correct me where I err.

http://www.nist.gov/dads/HTML/abstractDataType.html

"Abstract Data Type" is a computer science and a math term.  For that
reason, I believe that the phrase 'ADT-based programming' has no meaning.
What would 'module-based programming' mean?

"Object Oriented Programming" is a programming term.  Myself being a wannabe
computer science geek, I make a distinction between computer science and
programming.  

The other term that I see misused is "Data Structure".  

http://www.nist.gov/dads/HTML/datastructur.html

Examples of data structures are pointers, arrays, records, and files.
Examples of abstract data types are stacks, queues, graphs, and FIFOs.  ADTs
can be implemented in terms of data structures.  

John


-----Original Message-----
From: Mitch Chapman [mailto:Mitch.Chapman at bioreason.com]
Sent: Wednesday, January 16, 2002 8:42 AM
To: python-list at python.org
Subject: Re: algorithms and ADTs (was Re: efficient idiomatic queue?)

[quote deleted]

As Andrew hinted, a big distinction between OO classes
and ADTs is that the latter can't be subclassed.

ADT-based programming is useful in languages which don't
directly support OOP (e.g ANSI C).  They don't provide subclassing
or protocol/interface-based programming, but ADTs do
simplify encapsulation and memory management.

My first exposure to ADTs came when I started using
Modula-2.  Hence the claim that if you remove memory-management
(i.e. instantiation) from ADT-based programming you get
module-based programming :)

--
..and lots of singletons

Mitch Chapman
Mitch.Chapman at bioreason.com
--
http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20020123/06549d2c/attachment.html>


More information about the Python-list mailing list