Re: [BLACKBOX] Polymorphism

From: Douglas G. Danforth <"Douglas>
Date: Thu, 20 Nov 2008 20:59:49 -0800

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

Aubrey,
Might I suggest a name change?

ForEach ... Do

This closer to a for loop. It also corresponds in the SAIL
(Stanford Artificial Intelligence Language) to the FOREACH loop
of its LEAP associative triples

-Doug Danforth

Aubrey.McIntosh{([at]})nowhere.xy
> In writing my List module, I have a method DoEach that walks the list,
> and applies method Do to each element.
>
> (this: List) Do (VAR params: ANYREC), NEW, EMPTY;
> (root: List) DoEach (VAR params: ANYREC), NEW;
>
> In moving some existing software to the new library module, it turns
> out that I wish to apply a few different procedures to the list. In
> trying to avoid procedure variables, I find I am drawing a blank.
> Making several lateral extensions to the base record may be an
> approach, particularly if there is a pointer to a record with that
> particular implementation as one of the fields in params. I will
> alternate between envisioning some structure to do this and Goggling
> for the next while. A brief search of "Component Pascal Polymorphism"
> seems more or less on target and enough reading to fill a night.
>
> I thought I saw some message about this under the general heading of
> polymorphism on this list some years ago. If anyone remembers this,
> or can point to a file either in the distribution or online I'd focus
> my thoughts there fairly early on.
>
>
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-861672196_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxh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