Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"foo > 123 or foo IS NULL and bar < 12"

Now write this in SQLAlchemy without strings, without concatenation, and let's see which provides you with more clarity.



(FooBar.foo > 123) | (FooBar.foo == None) & (FooBar.bar < 12)

No strings, and I get an actual expression object instance that I can, for example, store in a variable and reuse in any number of queries.


Yes! Plus if you have a syntax error Python will catch it for you. Peewee works the same way.


LINQ. Composable queries rock.


LINQ is a black-box that is often disastrous for application performance. The more LINQ in a project, the more likely the project is headed to failure.


First of all, are you aware that LINQ is not only about database access?

Second, how is it a black box? It is the particular query provider implementation that is a black box.

Third, there's absolutely no correlation between the amount of LINQ and success of a project.


are you aware that LINQ is not only about database access

Yes, I am aware. How is this relevant at all to the context of this thread?

The rest of your comment: You are simply wrong. A heavy use of LINQ is one of the surest sign that one needs to run from a project. It is almost always used and embraced by people who have no concept of the consequences, imagining that the conciseness of LINQ = programming goodness, when the opposite is generally true.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: