3 ms·
Nevertheless dynamic languages can fail to typecheck. To continue the analogy: try { fair (trail); } catch (e) { if (e == InconsistentLawEx
by posterboy 10y ago
Nevertheless dynamic languages can fail to typecheck. To continue the analogy:
try {
fair (trail);
} catch (e) {
if (e == InconsistentLawException) {
// Oops, divided by zero,
// add a tiny epsilon to the denominator and keep going
law += epsilon;
} else if (e == ClassCastException) {
// some types are more equal than others
settlement (trail);
} else {
// escalate to higher instance
mapReduce (court);
}
} finally {
// might silently fail if
// higher_instance == SCOTUS and
// SCOTUS.busy == true
sentence (trial) . await (appeal (higherinstance));
}
- deleted 10y ago[deleted]