on reasoning in PLs:
-
on reasoning in PLs:
original C was reasonable - as in, translation of code to machine language was low on situational exceptions.
then we got compiler optimizations, and they made reasoning harder: if you reasoned by original mechanics (pessimistic), no harm would come to you, as your program would only run equal or better compared to projections.
but if you relied on optimization to e.g. save writing time on special casing, you would reason optimistically, and experience betrayal.
-
on reasoning in PLs:
original C was reasonable - as in, translation of code to machine language was low on situational exceptions.
then we got compiler optimizations, and they made reasoning harder: if you reasoned by original mechanics (pessimistic), no harm would come to you, as your program would only run equal or better compared to projections.
but if you relied on optimization to e.g. save writing time on special casing, you would reason optimistically, and experience betrayal.
this observation points to how reasonable languages should be designed and implemented:
1. start with determinable semantics that refuse the temptation to guess. if the execution path is ambiguous, force the user to make a choice.
2. add opt-in optimization guaranteed to improve the outcome. optional, so the user accounts for its possible absence.
3. allow user-side omissions where optimization grows reliable.
-
this observation points to how reasonable languages should be designed and implemented:
1. start with determinable semantics that refuse the temptation to guess. if the execution path is ambiguous, force the user to make a choice.
2. add opt-in optimization guaranteed to improve the outcome. optional, so the user accounts for its possible absence.
3. allow user-side omissions where optimization grows reliable.
@lritter as it happens, that's also the easiest path to take when building a new language
-
@lritter as it happens, that's also the easiest path to take when building a new language
@aeva harder when adapting an existing one. datalog really likes to guess.