Giter VIP home page Giter VIP logo

Comments (3)

mbrt avatar mbrt commented on May 25, 2024

I don't know how many people would like to see something like this in the common library, but I know what you can do to get there, if you want:

  1. You write a proposal with goals and some implementation details.
  2. Minimal working implementation.
  3. Add a decently documented version to the repo as a contribution (something people can download separately).
  4. Make it available in the standard library if adoption justifies it.

I think that especially 1. is important. What are you trying to achieve with this? Less typing? More clarity? In which way would this be advantageous? What is the disadvantage of not having this?

Point 4. also depends in how much other people like this.

Disclaimer: I'm not a Jsonnet guru either. One question that comes to mind however is: how do you see nested filters working? How would something like and(or(not(A), B), C) be represented with your helpers?

As an aside, I was thinking to add some shortcuts that I saw people using in the wild quite a few times. Example:

local lists(ls) = {
  or: [{ list: x } for x in ls],
};

// usage
{
  filter: lists(['[email protected]', '[email protected]']),
  actions: { archive: true },
}

Thanks for your contributions!

from gmailctl.

github-actions avatar github-actions commented on May 25, 2024

This issue is stale because it has been open for 30 days without activity.
This will be closed in 7 days, unless you add the 'lifecycle/keep-alive' label or comment.

from gmailctl.

blackjid avatar blackjid commented on May 25, 2024

Well, I think the bot made me look at this again.. Sorry never answered and thank you for the detailed response.
I think you got me on the first questions so if I ever get back to improve my gmailctl definitions I might get back to analyze this idea...

from gmailctl.

Related Issues (20)

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.