Quick code style question: Wild card binders

Hi, both work, so it is a matter of style, and I’m not sure which one is better style: If I generate a Case where the case binder is not used, should I * use the wildcard binder (mkWildCase), to be explicit about the fact fact that the wildcard binder is unused, or should I * generate a new Unique and a new Id nevertheless, because wildCard is bad? Thanks, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org

Hi, Am Dienstag, den 14.01.2014, 08:57 +0000 schrieb Joachim Breitner:
both work, so it is a matter of style, and I’m not sure which one is better style: If I generate a Case where the case binder is not used, should I * use the wildcard binder (mkWildCase), to be explicit about the fact fact that the wildcard binder is unused, or should I * generate a new Unique and a new Id nevertheless, because wildCard is bad?
here I is what I learned from SPJ: If I have access to a monad, better use a unique. Even if the case binder is not used _now_ when I generate the code, later simplifier phases might attempt to make use of it. If I had not access to a monad, then using the wild binder is ok if I have control over the body and its free variables. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org
participants (1)
-
Joachim Breitner