[bitc-dev] Opaque (Abstract?) types

Jonathan S. Shapiro shap at eros-os.com
Fri Jan 25 10:34:53 EST 2008


Quite a while back, we discussed the following:

I want to have a pair whose first element is a reference, and whose
second element is a procedure accepting that reference. Naively this is
something like:

   (pair  (ref 'a)  (fn  (ref 'a)  ())

But what I want to express is that we don't care what the 'a is as long
as it matches inside the pair. That is, my intention is that I should be
able to specify a mutable slot within a structure of this type, and I
should be able to first assign into this slot a pair of type

  (pair (ref char) (fn (ref char) ())

and then later assign a second pair of type:

  (pair (ref int) (fn (ref int) ())

I believe we concluded that there wasn't any fundamental difficulty with
this (aside from representation sizes), but I do not recall whether

  (1) we ever did anything that would support it, or
  (2) it is already expressable in some way that I have
      not considered.


shap



More information about the bitc-dev mailing list