[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Lisp comprehensions => SQL

Victor 'Zverok' Shepelev

12/6/2006 12:44:00 AM

From: Logan Capaldo [mailto:logancapaldo@gmail.com]
Sent: Wednesday, December 06, 2006 2:32 AM
>There's a problem:
>> (articles+authors).select{|article, author|
> articles+authors perfectly doable. Same with select
>> article.author_id == author.id &&
> article.authod_id == author.id # doable with appropiate def's of
>author_id, #==, id, etc. What's _NOT_ doable is &&. You can't override
>that. You have to use another operator or something like any do ... end

Ooops. I was a C++ guy before Ruby. I've just forgotten Ruby has no
overridable && operator. Sorry my stupidness.

(ok, we can do some 'imitation' with & and | operators, but the overall
beauty of "no DSL" idea is failed).

Thanks for your comments.

V.