Isn't this basically what Ambition is?

    http://ambition.rubyforge.org/

--Jeremy

On Tue, Oct 7, 2008 at 9:31 AM, Trans <transfire / gmail.com> wrote:
>
>
> On Oct 7, 5:11 am, Pe=F1a, Botp <b... / delmonte-phil.com> wrote:
>> From: Trans [mailto:transf... / gmail.com]
>> #...
>> #   r =3D query do
>> #         from :c =3D> :customer, :a =3D> :account, :b =3D> :bank
>> #         select b.name
>> #         where (( c.firstname =3D=3D first1 ) |
>> #                ( c.firstname =3D=3D first2 ) ) &
>> #               ( c.lastname =3D~ last ) &
>> #               ( a.owner =3D=3D c ) &
>> #               ( a.bank =3D=3D b )
>> #   end
>>
>> try
>>
>>    r =3D query(customer, account, bank)  do |c,a,b|
>>          select (( c.firstname =3D=3D first1 ) |
>>                 ( c.firstname =3D=3D first2 ) ) &
>>                 ( c.lastname =3D~ last ) &
>>                 ( a.owner =3D=3D c ) &
>>                 ( a.bank =3D=3D b ) .
>>          collect b.name
>>        end
>
> Ah, I see. Ok, then even a little more Rubyish:
>
> r =3D select(customer, account, bank)  do |c,a,b|
>      (( c.firstname =3D=3D first1 ) ||
>       ( c.firstname =3D=3D first2 )) &&
>      ( c.lastname =3D~ last ) &&
>      ( a.owner =3D=3D c ) &&
>      ( a.bank =3D=3D b )
>    end.
>    collect(customer){ |b| b.name }
>
>> #...
>> # But is Ruby ultimately expressive enough? We
>> # may end up adding enough new syntax
>>
>> i think ruby syntax is more than enough (imho). In a way, i'd like to th=
ink like active records when it comes to databases (in mfowler's sense, not=
 rails) and use ruby to implem.
>
> How does Fowler's approach differ from Rails? I didn't know there was
> an essential distinction.
>
> T.
>
>



--=20
http://jeremymcanally.com/
http://entp.com/
http://omgbloglol.com

My books:
http://manning.com/mcanally/
http://humblelittlerubybook.com/ (FREE!)