Nick Kallen <[EMAIL PROTECTED]> writes:
> > You cannot do this in Cayenne, there are no operations that scrutinize
> > types. They can only be built, and never examined or taken apart.
> > This is a deliberate design choice. The consequence is that type
> > cannot affect the control of a program, so they cannot really influence
> > the result of a program, and are thus needless at runtime.
...
> The whole idea behind dynamic types is that run-time type information can be
> inspected and manipulated.
>
> You can add dependant types to Cayenne (theoretically) just by allowing the
^^^^^^^^^ dynamic?
> run-time type inspection that you intentionally disallowed. In my mind,
> you'd kill two birds with one stone.
Watch out here; there may be a limit to how much run-time type
inspection it is reasonable to do in the presence of dependent types.
Suppose you're examining a type which happens to be the type of some
sorting function:
(Ord a) => (l :: [a]) -> ((l' :: [a]), sorted l l')
How much type inspection are you willing to allow on that? How much
good will it do you?
(I made up my own syntax in the above type expression; I hope it makes
sense.)
Carl Witty
[EMAIL PROTECTED]