Re: [BLACKBOX] Polymorphism

From: [at]} <Aubrey.McIntosh{>
Date: Sun, 30 Nov 2008 13:32:06 -0600

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

On Sun, Nov 23, 2008 at 6:07 AM, Alexander Iljin <ajsoft.gm{([at]})nowhere.xy
> Hello!
>
> AMAUN> I replaced the VAR record statements with pointers. Primarily I did
> AMAUN> this because I can't call a method from an uninitialized pointer, so
> AMAUN> there are fewer tests needed for good data.
>
> On the other hand, static RECORDs (not POINTERs) are allocated on
> stack, so there is zero dynamic memory overhead (no NEW/GC
> involved). The stack memory is released upon the exit from the
> procedure where the RECORD local variable is declared. Using static
> RECORDs is almost the same as passing their contents as parameters
> to the Do procedure, which they are, essentially, in this case.
>

I have moved the previous project to the new list module. The source
to the Alm01List and Alm01Gather are on pastebin, and so is an encoded
file with both.

http://text.pastebin.com/m5a35fcd3
http://cp.pastebin.com/m3c6fa37c
http://cp.pastebin.com/m60a6de8b

This has been a very simple exercise, but nonetheless was interesting.
 For example, I started thinking that ListOrdered, ListFIFO, and
ListLIFO are extensions to List that are incompatible with each other.
 For example, a FIFO is ordered by time, but may have data that cannot
be compared by the Lt or Gt operators. An ordered list must have a Gt
or Gt operator. But applying this operator could destroy the
invariants of a FIFO.

This migration sharpened the distinction between lists that are NIL
when empty and lists that have a sentinel value.

I am surprised that the binary code grew a lot. I had expected it to
become smaller. I hope this is from some unfortunate addressing style
that I have used, but which a good editor would recognize and correct.


>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
>



-- 
-- 
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-515563533_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcY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QuXHBhcg0KMTUwMiBEZXZvbiBDaXJjbGVccGFyDQpB
dXN0aW4gVFggNzg3MjMtMTgxNFxwYXINCmh0dHA6Ly9ob21lLmdyYW5kZWNvbS5uZXQvfmFtY2lu
dG9zaC9hdWJyZXkvU2VhcmNoL1xwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNj
cmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNU
U0VSVkBMSVNUUy5PQkVST04ufX0AMDA4IDEz
----boundary-LibPST-iamunique-515563533_-_---
Received on Sun Nov 30 2008 - 20:32:06 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:50 UTC