[Types-sig] Type Annotations Progress report

Tim Hochberg tim.hochberg@ieee.org
Thu, 15 Mar 2001 12:00:49 -0700

Paul Prescod  writes:
> Before I documented everything I wanted to do a real-world test. So I
> added type annotations to the os module. I even added a new type that
> was local to that module for handling P_WAIT, P_NOWAIT. I'd appreciate
> if people would at least take a cursory peek at the os module, if not
> the implementation.

I've taken only a quick peak at the implementation, and here are a few small
comments based on that peak. First, since there is a common Interface class,
should we add intersection and union as & and |. I know you prefer 'and' and
'or', but the former we can do now, the later has to wait for language

Also, I see that CheckInterface, if passed a tuple or a list as in
interface, checks each item in the checked object against each item in the
interface. For those playing along at home who found that statement
completely meaningless:

  val : (IString, IInteger, IFloat)

Checks that val[0] is an IString, val[1] is an IInteger and val[2] is an

I like this. So, should using a tuple imply something different about val
than using a list (mutable sequence vs immutable sequence). I'm leaning
toward not, but I figured I'd bring it up.

On the third hand, the above syntax puts a kink in my hope of using & and |

   val : (IString, IInteger) | (IFloat, IFloat)

won't work. Harumph.