Design Principles Behind Smalltalk, Revisited

Todd Blanchard tblanchard at mac.com
Mon Jan 1 21:50:28 UTC 2007


On Jan 1, 2007, at 1:23 AM, J J wrote:

>> From: Todd Blanchard <tblanchard at mac.com>
>>
>> aDatabase readOneOf: User where: [:user | user login = 'jhouchin'].
>>
>> -Todd Blanchard
>
> Tools like GLORP are very nice: they save you writing SQL  
> directly.  But look at your line of code:  it is SQL in message form.

You know, that is a good point.  I think it would be easy to emulate  
the squeak collections operations though.
ie

database users detect: [:ea | ea login='todd'] -> readOneOf: User  
where:...
database users select: [] -> readManyOf:...
reject:....

Basically treating each entity as a collection.  That might be worth  
doing and should be pretty easy.
Good idea.

-Todd Blanchard




More information about the Squeak-dev mailing list