Coder Social home page Coder Social logo

pop's People

Contributors

fare avatar pacman99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ink-splatters

pop's Issues

type check properties

Best idea I've come up with to do this is to have yants export a function that generates a type checking pop. This pop will simply have an extension that does nothing but type check a series of values. If there are any problems, yants check functions will throw errors, otherwise the extension can just return an empty attrset. This could be implemented in yants itself.

Supers are not lazily evaluated

nix-repl> pop.lib.pop { supers = [ { a = throw "err"; b = 5; } ]; }
error: err

An attribute in a pop containing an error shouldn't error out the entire pop. Other attributes should still be accessible even if one attribute errors out.

The following code should print out 5, but it would just error out now.

p = pop.lib.pop { supers = [ { a = throw "err"; b = 5; } ]; }
p.b

cc @fare

Special Attributes

Many times there are attributes you want to include in a POP for utility purposes, but they shouldn't be in the end result(after unpopping). There should be some way to mark certain attributes as special.

This could also replace #1 since you can just add extenders in a pop's extension and mark those attributes as "special", so they get removed when unpopping.

p = pop {
  defaults.value = 0;
  extension = self: super: {
    # Mark increment as "special" somehow
    increment = pop { supers = [ self ]; extension = _: _: { value = super.value + 1; }; };
  };
}
unpop (p.increment.increment) => { value = 2; }

or with #7

pop {
  defaults.value = 0;
  extension = self: super: {
    increment = self (self: super: { value = super.value + 1; });
  };
}

cc @fare

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.