Code Monkey home page Code Monkey logo

Comments (3)

ollef avatar ollef commented on June 10, 2024

Hey!

Good question. I initially based the type inference on "Complete and Easy ..." (but with metavar handling based on http://okmij.org/ftp/ML/generalization.html). If I remember correctly (this was a couple of years ago) I couldn't come up with a way to adapt it to the setting where you have implicit arguments that can optionally be given explicitly, and found that easier with the "Practical ..." system. That was probably my fault though, and not the system's.

One advantage of "Complete and Easy ..." is that it gives details for how you can represent e.g. unification variables (which are in their "context"), so there are fewer details that have to be made up or extrapolated by you as the implementer. The exposition is also unusually clear, so in that sense it's easy to implement.

However, any time you try to base a "real-world" system on short research papers there's always going to be a lot of extrapolation (how to do mutually recursive top-level definitions, ADTs, or pattern matching?). I also don't think that the amount of code or its complexity will differ greatly whichever system you choose.

It's possible that I'll revisit this choice at some point, especially since there are a few planned extensions to Sixten's type system.

from sixten.

atennapel avatar atennapel commented on June 10, 2024

Ah okay, thanks for the detailed answer! Another question: how do you feel about impredicative instantiation? Neither "Complete..." or "Practical..." support this. Do you think you will need this feature or did you already decide it's not a necessity?

from sixten.

ollef avatar ollef commented on June 10, 2024

No problem!

It feels less clear cut when all you have is implicit arguments, but Sixten does not currently support it at least. I haven't really missed it in Haskell (well, maybe I would if it didn't have the hack for ($)?), so I'm hoping I won't miss it in Sixten either. :)

from sixten.

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.