Hey folks --

I've been thinking about this proposal for a while... First, in the interest of full disclosure I've got to say that's it's difficult to accept something like this knowing that I'll need to change thousands of lines of code... I'll try to set that aside, though.

I think all in all it's a good idea, but I do have one big objection: one of the things that's always bugged me about ORMs is that they shield you from knowing when you're hitting the database. This sucks when it comes time to optimize because you can't always tell what methods are "slow" and which are "fast."

One thing I love about Django's ORM is that you always know when you're hitting the database: if the method starts with "get", then it's a database hit. Easy and simple.

Another thing to think about is that currently relation methods "make sense" when hit from a template::

        {{ reporter.name }} has {{ reporter.get_article_count }} articles.

I agree that len(reporter.articles) is more pythonic, but at the same time it's not as accessible from the template.

I also agree with Robert that if we use a descriptor is should be named in a way that doesn't need pluralization; that's currently how methods are named (get_article_list, get_article_count, etc.).

I guess in essence it comes down to whether we'd rather be explicit (reporter.get_article_list()), or "pythonic" (reporter.article_list)...

Jacob

Reply via email to