From: Anthony Jenkins <abjenkins@mindspring.com>
Subject: Runtime object type determination/ runtime generic instantiation
Date: 1997/11/06
Date: 1997-11-07T00:32:51+00:00 [thread overview]
Message-ID: <34626166.D12266B@mindspring.com> (raw)
I'm having to instantiate a generic package which can use any private
type (equality/assignment methods defined) for a type specified in a
file. e.g. the string "character" would be read from a file and I'd
have to use my package instantiated for the type 'character'.
If runtime generic instantiation were possible I could avoid
instantiating the package for every single non-limited type there is,
and if runtime object type determination were possible I was thinking I
could determine how to handle the type in the package body at runtime
(since strings I believe are non-limited and differ substantially from
scalar non-limited types in their handling).
The package I have to create is one for (un)directed graphs, where the
vertices can represent numbers, characters or strings (I'm thinking more
generically than these 3 types so I can possibly use it later) where the
node value type is given in a file. Am I looking at this wrong? I'm
seeing a huge (well, 3-clause) CASE statement (after instantiating each
of 3 different graph packages) that calls whatever operations are
available from the package using that type. Anyway, thanks in advance
for any pointers.
Anthony Jenkins
http://www.auburn.edu/~jenkian
abjenkins @ mindspring , com (Death to spammers)
-------------
"God is as real as I am," the old man replied. My faith was
restored, for I knew Santa would never lie.
next reply other threads:[~1997-11-06 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-06 0:00 Anthony Jenkins [this message]
1997-11-08 0:00 ` Runtime object type determination/ runtime generic instantiation Jon S Anthony
1997-11-10 0:00 ` Anthony Jenkins
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox