Gravatar The 'foo = bar || 123' problem happens in most languages ... I often use that idiom in Python ('foo = bar or 123'), PHP and Perl ('$foo = $bar || 123').

I remember the Perl6 guys talking about an operator - //, I think --that would return the left value if it was defined or the right value otherwise. So you would say '$foo = $bar // 123' to get what currently requires you to say '$foo = defined($bar) ? $bar : 123'.

I think the point with the xxx || default construct is that it makes me *stop* when I see it, and wonder if there's an issue. Maybe it will never occur in real life, and it's easy to code, but it's harder to *read*.

I suspect your "messiness" impression is a variation on the "write-only language" reputation that Perl has. It's (a little) harder to write code in Python, but the code you do write is far easier to read (and hence maintain).

OTOH, Python can be less concise than the likes of Perl/Ruby, which harms readability. Example: I have a pretty simple bit of server code, conceptually not much more than a page or so of code, but it's *swamped* with exception handling and logging calls, simply because it needs to be robust (as it's server code). Perl/Ruby's ability to craft little domain-specific languages would have been nice here.

Gravatar Look closer: Ruby is object oriented Perl with a few things eliminated. That means that large projects in Ruby are going to have sections of unreadable Perl, it's inevitable.

Sure, Ruby was growing before Rails. Dylan is currently growing, too. It's not hard to grow when you start near zero.