Ed Watkeys on 29 Aug 2007 21:18:34 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[philly-lambda] Re: Pattern or Antipattern?




On Aug 29, 3:05 pm, "Andrew Gwozdziewycz" <apg...@gmail.com> wrote:
>
> I can't help but think there's a reference to be made to Greenspun...
> That ifNot looks awfully "macroish" to me.

Actually, I was thinking something simpler, but I like the way you
think!

class Log {

  // ...

  boolean ifNot(boolean flag, String message) {
    if(!flag) { debug(message); }
    return flag;
  }

  // ...

}

That may be the first Java I've written since 2003. Another approach
would be to use an aspect-oriented programming facility.

Ed


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Philly Lambda" group.
To unsubscribe from this group, send email to philly-lambda-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/philly-lambda?hl=en
-~----------~----~----~----~------~----~------~--~---