Dynamic Casts
Proposed by Greg Stein
General syntax: expression ! type
Example: x = y ! int
if y has type int: assign y to x
otherwise: raise TypeError
Problem:
must catch exception to decide union type
Alternative: ‘typecase’ statement?
no syntax proposal exists yet
Previous slide
Next slide
Back to first slide
View graphic version