[BLACKBOX] Abstract List Module

From: [at]} <Aubrey.McIntosh{>
Date: Tue, 18 Nov 2008 17:57:37 -0600

----boundary-LibPST-iamunique-706833001_-_-
Content-type: text/plain

I have put an encoded Abstract List module online for a month at
http://pastebin.com/m9f69d4b
Please be aggressive and make recommendations for improvements.

For those who want to read on and on ...

I was writing code to take a "chart" that contained lines of triples
{("buy" | "sell), rate, total}
<http://xstreetsl.com/modules.php?name=Currency&file=orderlist> and
show changes from one report to another. While I was adapting some
old source to deal with a list operation, it occurred to me that an
Abstract implementation should save me from doing this over and over
and I wasn't really using BlackBox effectively.

I did a Google search and it seems that the Java community wants to
put everything they can think of into their List class. Even some
kind of behind the scenes support to inter convert from lists to
arrays. I think that is too complicated so I wrote a minimal set of
methods off the top of my head.

I still have trouble writing clean code when I extend records, and so
as simple as this module is, it represents a lot of re-reading and
thought. The method Do is introduced primarily to allow the DoEach
procedure to be written and debugged in the abstract module and not
touched again. I haven't actually tested "Remove" so if it seems to
be squirrely, perhaps it is.

-- 
-- 
Aubrey McIntosh, Ph.D.
1502 Devon Circle
Austin TX 78723-1814
http://home.grandecom.net/~amcintosh/aubrey/Search/
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-706833001_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmR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