🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3560

Re: The search for heterogeneous lists is still on!

#3560
From: Darren New
Date: Wed, 17 Apr 1991 18:40
54 lines
3310 bytes
In article <1991Apr17.040927.21608@eng.umd.edu> lbruck@eng.umd.edu (Lewis Bruck) writes:
>The sizeof "function" is resolved completely at compile time (simple
>lookup in the type information that the compiler (at whatever pass)
>has determined to find the physical size).

I know this.  What is your point?
(If it was just to enlighten me, thanks, but I've been programming
in C for 7 years. :-)

---------------------

I didn't want to start this thread up again, but since it's started
again, I just wanted to mention a couple of things I thought of.

The two main uses I see for hetrogeneous lists and dynamic typing
that cannot be conveniently done with static typing are these:

1) A hetrogeneous list used for resource management. For example, the
environment list, the xrdb program, etc.  This is normally solved by
storing everything as strings, but that requires parsing that shouldn't
be necessary (e.g., storing a path as a colon-spearated string).  This
can be done correctly (and sufficiently conveniently for me) with a
polymorph type. Hermes has such a type: any value can be "wrapped" into
a polymorph and later unwrapped back into a namipulable value, at which
time it is runtime checked to be the right type.  I think most of the
other stuff about sorting and such can be done with generics well
enough.

2) An object-oriented object.  Static languages have these, but if I
want an object that can do A,B,C,D,E,F, and G, and another object that
can do A, C, D, F, and G, and a third one that can do B, C, E, and F
and .......   then defining these as all statically typed can be ugly.
For example, a menu that responds to "up", "down", and "picked", a
scrolling window that responds to "up", "down", and "contents" and
"picked", and a button that responds to "contents" and "picked".  In
the degenerate case, you need gobs of declarations of different
subsets, all of which may change when you need a new subset that picks
different functions out of them.  I don't know any convenient way of
handling this without casts or dynamic binding.

---------------------------

Did ya ever notice how the nifty language research (like Hermes or
Modula-3) always implements languages under UNIX, and nifty OS research
(like NeXT IB or Ameoba) always writes the OS in C?  Yuck!  Why not put
Hermes under Ameoba, or use Modula-3 to write IB or something?

               :-)   -- Darren

-- 
--- Darren New --- Grad Student --- CIS --- Univ. of Delaware ---
----- Network Protocols, Graphics, Programming Languages, FDTs -----
     +=+=+ My time is very valuable, but unfortunately only to me +=+=+
+=+ Nails work better than screws, when both are driven with screwdrivers +=+
Technical Details
Message-ID: <51076@nigel.ee.udel.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!ee.udel.edu
References: <10977:Apr319:27:2891@kramden.acf.nyu.edu> <49726@nigel.ee.udel.edu> <1991Apr17.040927.21608@eng.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!ee.udel.edu
From: new@ee.udel.edu (Darren New)
Newsgroups: comp.lang.misc
Subject: Re: The search for heterogeneous lists is still on!
Keywords: Thrust! Repost! Lunge!
Message-ID: <51076@nigel.ee.udel.edu>
Date: 17 Apr 91 18:40:43 GMT
References: <10977:Apr319:27:2891@kramden.acf.nyu.edu> <49726@nigel.ee.udel.edu> <1991Apr17.040927.21608@eng.umd.edu>
Sender: usenet@ee.udel.edu
Organization: University of Delaware
Lines: 54
Nntp-Posting-Host: estelle.ee.udel.edu