[e-lang] An attack on a mint
Chip Morningstar
chip at fudco.com
Mon Mar 10 03:44:05 EDT 2008
"Dean Tribble" <tribble at e-dean.com> 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
More information about the e-lang
mailing list