The compatibility of on-demand calls (laziness) and callsign (strictness) in a single language implementation is certainly possible if you try to avoid lazy calculations with side effects and make divergent calculations strict.
Constraint analysis is used in lazy (CBN) functional languages ββto detect when functions can be safely evaluated using the CBV strategy. CBV evaluation is usually faster, but using this evaluation strategy for non-strict functions changes the semantics of the program.
Wadler describes how to combine lazy and rigorous computations in a functional language.
In the latter case, the problem also resolves the problem.
Scala has the lazy keyword to indicate that some calculations should be done lazily. Other languages ββhave similar constructs.
source share