Object Relational Mappers are evil (a meditation)

Lie Ryan lie.1296 at gmail.com
Thu Dec 24 05:54:18 EST 2009


On 12/24/2009 12:11 PM, Terry Reedy wrote:
>>> This buggy idiom survived many years of Python development, missed by
>>> virtually everyone.
>
> The last statement is false. The hazard of using and/or was well-known
> back in '97 or so when I discovered or learned it and I believe it was
> mentioned in the FAQ entry on the subject. The new alternative has the
> hazard that the condition and if-branch must be written and read in a
> backwards order. I consider that buggy and do not use it for that reason.

Oh really? I thought putting the conditional in the middle was 
ingenious, whoever thought that must have the next Turing award!

I always feel there's something wrong with the (condition ? true : 
false) or (if condition then true else false) expressions found in other 
languages; and just realized it was because of their unnatural ordering. 
I have to admit initially the reversed ordering do confound me, but 
afterward it felt even more natural than the traditional 
"conditional-first" expression.



More information about the Python-list mailing list