GithubHelp home page GithubHelp logo

Comments (6)

fgmccabe avatar fgmccabe commented on June 17, 2024

from interface-types.

lukewagner avatar lukewagner commented on June 17, 2024

Yup, me too; I think this is the role of the type system in validating binding expressions.

from interface-types.

alexcrichton avatar alexcrichton commented on June 17, 2024

Oh sorry I should have clarified that my intention here wasn't necessarily to add more typechecking but moreso not rely on typechecking for this sort of validation, but rather the staitc structure. I don't think it's possible to typecheck where get or field is a top-level expression, nor can any of the other in-expr above show up as an input to another in-expr, so I was curious to just reflect this in the static structure of the section as opposed to relying on typechecking to figure it out.

from interface-types.

fgmccabe avatar fgmccabe commented on June 17, 2024

from interface-types.

fitzgen avatar fitzgen commented on June 17, 2024

I am also in favor of pushing static constraints from the (so far, unspecified) validation algorithm, to the grammar itself, when possible. It means that you we can do less validation work after parsing, since if something parsed and the grammar enforces a certain property, then we know that the relevant property is upheld without doing another validation pass.

This is obviously not possible for every property, but in the case of the straw proposal in the OP, it is possible and makes sense to me.

from interface-types.

pchickey avatar pchickey commented on June 17, 2024

Closing as out-of-date: the proposal has evolved and no longer involves binding expressions as described here. A validation algorithm still needs to be specified, see #29

from interface-types.

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.