[LRUG] To debug the impossible bug

Matthew Rudy Jacobs matthewrudyjacobs at gmail.com
Wed Aug 3 05:39:49 PDT 2011


I think its a nice pattern
but its a bit crap to use the same keyword "case" for a totally different
pattern
(which seems to be used very rarely)

I guess its another consequence of the fact that Ruby has derived its syntax
from 5 or 6 different languages, all blended together.

Better to give it a different keyword.

On 3 August 2011 12:37, Simon Coffey <simon at tribesports.com> wrote:

> On 3 August 2011 12:26, Matthew Rudy Jacobs <matthewrudyjacobs at gmail.com>
> wrote:
> > Yeah,
> > you're right Simon.
> > Apologies for taking us on a tangent.
> > But over the past 5 years I have NEVER seen this use of a case statement.
> > :s
>
> Heh, I make no claims for the beauty or otherwise of this code. It's a
> style we use quite a lot, though, primarily in Rails helpers where
> conditional logic has a habit of proliferating. I just find it clearer
> than a long string of if/elsifs.
>
> Thanks anyway, and no worries. Now. Instance variable corruption... :-)
>
> Cheers,
> Simon
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20110803/23695c66/attachment-0003.html>


More information about the Chat mailing list