[m-users.] Ambiguous tail recursion?
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Jul 17 22:37:41 AEST 2019
On Wed, 17 Jul 2019 13:04:30 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> The order of conjunctions doesn't matter to the declarative semantics of
> the code; it definitely matters to the operational ones.
Besides the operational semantics, the order in which you write conjuncts
also matters to the *readers* of the code. The vast majority of predicates
have only one mode, and these predicates are much easier to read
if the order in which the conjuncts appear on the screen is also
the order in which they get executed. Reordering conjuncts as needed
to satisfy data dependencies can be done in a small fraction of a second
by the Mercury compiler, but humans are much slower at that task :-(
Zoltan.
More information about the users
mailing list