{'fraction_non_alphanumeric': 0.014925373134328358, 'fraction_numerical': 0.0, 'mean_word_length': 5.0602409638554215, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Gradual Types for Objects Redux

The enduring popularity of dynamically typed languages has given rise to a cottage industry of static type systems, often called gradual type systems, that let developers annotate legacy code piecemeal. Type soundness for a program which mixes typed and untyped code does not ensure the absence of errors at runtime, rather it means that some errors will caught at type checking time, while other will be caught as the program executes. After a decade of research it is clear that the combination of mutable state, self references and subtyping presents interesting challenges to designers of gradual type systems. This paper reviews the state of the art in gradual typing for objects. We introduce KafKa, a class-based object calculus with a static type system, dynamic method dispatch, transparent wrappers and dynamic class generation. We model key features of several gradual type systems by translation to KafKa and discuss the implications of the respective designs.