GithubHelp home page GithubHelp logo

Reverse key-filter arguments? about liquidata HOT 2 OPEN

jacg avatar jacg commented on September 3, 2024
Reverse key-filter arguments?

from liquidata.

Comments (2)

gonzaponte avatar gonzaponte commented on September 3, 2024

I think {key : predicate} is more intuitive as we read from left to right*. But in the end, this is the same dilemma as with get/put:
(get.a.b * f >> put.x.y is the most readable form as a whole (IMHO), while
(f * get.a.b >> put.x.y) makes more sense in terms of understanding what operations are applied to the data.

I think I prefer {key : predicate}, but I don't have a strong opinion about it.

from liquidata.

jacg avatar jacg commented on September 3, 2024

this is the same dilemma as with get/put

get and put give the user the choice. For key-filters we have to pick one order to which the user will have to conform.

(get.a.b * f >> put.x.y is the most readable form as a whole (IMHO), while (f * get.a.b >> put.x.y) makes more sense in terms of understanding what operations are applied to the data.

Exactly, it's context-dependent, so it's good to leave the choice to the user.

I think I prefer {key : predicate}, but I don't have a strong opinion about it.

I prefer it too, but : key is essentially an option, and it seems weird to have the option precede the main item. Consider sorted(data, key=xxx) etc.

I think I'll probably change it to { key : predicate }, but I don't think there's any hurry, it's not as if we're going to get a thousand users by next week.

from liquidata.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.