Hacker News new | ask | show | jobs
by michaelmcmillan 2996 days ago
Not intended as criticism, but isn't it easier to just express your query in Python using filter?
2 comments

Yes. You are right. But I wanted the way to store my queries in any major database. And I wanted natural simple queries.

If I need to check my dictionary I want to use something similar to natural language.

lambdas and filters are greate, but not obvious at a glance.

If I want to check my dict: "Username is 'john' and age is greater than 23"

I will make this query: "`username` == 'john' and `age` > 23"

This query is obvious (i hope it is) for anyone from first glance

maybe even more simple than reinventing a langage using lambda functions applying on path/value in a dict with an iterator (which can be consumed by filter/any/map/reduce) http://vectordict.readthedocs.io/en/latest/finding.html