GithubHelp home page GithubHelp logo

Unsafe API about laserdisc HOT 2 OPEN

laserdisc-io avatar laserdisc-io commented on August 21, 2024
Unsafe API

from laserdisc.

Comments (2)

sirocchj avatar sirocchj commented on August 21, 2024

/cc @barambani @fiadliel @nicodom I'd like to collect your thoughts on this.

My current belief is that this could easily open up the can of worms for anyone to abuse of this "feature" but otoh it would also facilitate the adoption.. As in, we're not pushing the burden all the way to the end user - who'd have to take full responsibility for having to explicitly write code that would be unsafe to satisfy laserdisc's constraints - but we're "easing" the adopter's pain of integration into existing unsafe code by allowing an escape hatch where this unsafe code is the same for everyone and provided by laserdisc itself

from laserdisc.

barambani avatar barambani commented on August 21, 2024

My 2c. As discussed recently in a couple of real life examples, I think there's no reason to relax the constraints on the keys (being non empty for a single key or being non empty list of keys for a group). The decision of what to do at runtime in case the key is empty is actually easier if it's pushed all the way up to the place where this key is generated from the string (usually a deserialisation from a text format if it's at runtime). Mainly the question there is what to do in that case. It can also be that the user might want to throw an exception, but I think we shouldn't help her in that. Sending a command to Redis with an empty key is never correct, so IMHO it should never be allowed by the type.

from laserdisc.

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.