Re: An attack on a mint

Chip Morningstar <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
"Dean Tribble" <[email protected]> wrote:

>I would think it would be better to explicitly articulate the
>different case, even though it costs a conditional, as in:
>
>    int take(final PurseX src) {
>          REQUIRE(dead);
>          REQUIRE(src);
>          if (src == this) {
>              // no-op deposit for self
>              return 0;
>          } else {
>              final int r = src.balance;
>              // for fail-safe, always reduce value or authority first
>              src.balance = 0;
>              balance += r;
>              return r;
>          }
>      }

Am I the only one who notes the irony of *Dean* attacking this via
the use of EQ?

Chip
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.