{'fraction_non_alphanumeric': 0.0189873417721519, 'fraction_numerical': 0.0, 'mean_word_length': 4.859259259259259, '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}}
LazyJ: Seamless Lazy Evaluation in Java

LazyJ is a backward-compatible extension of the Java programming language that allows programmers to seamlessly tap into the power and expressiveness of lazy evaluation. It does so by extending Java’s type system with lazy types. A variable of type lazy T (where T is any Java type) can hold a thunk which when evaluated will yield a value of type T. The existence of coercions between non-lazy and lazy types eliminates the need for explicit delay and force operations. In this paper, we introduce LazyJ with several motivating examples and formalize the semantics of the language with Featherweight LazyJ, an extension of Featherweight Java. We also describe our implementation, which is built on top of the Polyglot extensible compiler framework.