I want to learn a new language...

Levi Pearson levi at cold.org
Thu Feb 15 20:18:51 MST 2007


"Eric Wald" <eswald at brainshell.org> writes:
>
> My biggest beef with Ruby is its conditional expression.  Seriously, any
> language in which the number zero is *true* deserves a slap in the face.

Your brain has been seriously deformed by extended exposure to C and
its ilk.  0 is a numeric value, and there is no inherent reason for it
to be either true or false.  C thinks it is false because it is a
byte-oriented language, and a byte devoid of bits is a reasonable
representation for false.  Lisp, on the other hand, is list-oriented,
and uses the empty list (aka nil) to mean false.  Anything that is not
false is true, as in C.  Ruby borrows from Lisp to some degree, and
probably picked up the convention there.  It is also perfectly
reasonable.

>
> Second-biggest beef: Everyday code snippets, those used as examples of
> its expressiveness and power even, use crazy symbols that mean nothing
> to the outside observer.  I had to dig to figure out what the @ symbols
> were doing, and the pipes around the block argument list aren't exactly
> intuitive.

All I can say is that, again, your brain has been warped.  How can you
not mind perl sigils, but count Ruby sigils as your second biggest
beef?  And the pipes around the block argument list are borrowed
straight from Smalltalk, so there's well-established precedent for
them.

> Third-biggest beef: The === operator, which I first encountered as
> identity in PHP, is some sort of tripped-out range or loose-equality
> thing, and automatically called by the case statement.  I don't even
> want to touch the thing, particularly since it feels backwards.

So it's backwards now to use an arbitrary symbol differently than PHP
does?  Heaven help us.  Or, maybe just you.

                --Levi




More information about the PLUG mailing list