3 ms·
I don't think this is the same. `Dynamic` is an object along with its reified type. Now consider a dynamically typed function that returns either a String or an
by millstone 11y ago
I don't think this is the same. `Dynamic` is an object along with its reified type. Now consider a dynamically typed function that returns either a String or an Int, according to a Bool parameter. This function ought to be statically type-able as Bool->String OR Bool->Int. It does not have a single static type, so it cannot be represented as `Dynamic`.
- ambrosebs 11y agoI went back to Siek & Taha's original formulation and they have a nice examples section in 5.3 of some interesting higher-order cases with Dyn, that better demonstrates than my clumsy attempt. http://www.cs.colorado.edu/~siek/pubs/pubs/2006/siek06:_gradual.pdf http://www.cs.colorado.edu/~siek/pubs/pubs/2006/siek06:_grad...