Giter VIP home page Giter VIP logo

rise's People

Contributors

b-hagedorn avatar bastacyclop avatar bastian-koepcke avatar cdubach avatar fedepiz avatar johanneslenfers avatar michel-steuwer avatar roger-uw avatar tremmelg avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rise's Issues

Should there be a makeArray primitive, and for what?

Currently we have a makeArray primitive that works very much like an array literal, except that it works with elements that are expressions, instead of plain data like literals do. Currently we only generate code for makeArray if indices are constant (we know which element to pick at codegen time).

  1. Why can our normal array literals not contain arbitrary expressions?
  2. Should we generate code for non-constant indices, and how?
  3. Why do we need array literals when we can use array constructors like makeArray?

Personally, I would like to solve both of these questions by removing the makeArray primitive. Instead of plain data, normal array literals would take elements of expression kind.

Additonnaly, a selectArray -- or differently named high-level construct -- would also allow to create arrays as a combination of generate and select. This would generate C code with if statements or ternaries to pick the right element. If indices are constant, we should simplify the branching away.

@rise-lang/core

Remove TypePlaceholder

TypePlaceholder was introduced to deal with expressions instantiated to different types at call sites by delaying the creation of fresh type identifiers. It can also be used as a "placeholder" when we erase the type of expressions. With a properly implemented type identifier instantiation mechanism, TypePlaceholder can be removed from this implementation.

More Informative Type Inference Error Messages

Currently we don't have sufficiently good type inference error messages, and it is hard to locate the actual source of the error. Potential solutions include type inference on construction and constraint decomposition trace.

Subtyping constraints

Some primitive types are currently under-constrained. Some type variables should only accept scalar types (vector primitives) or basic types (cast primitive). Ideally, type inference and type checking should deal with these constraints.

Dependent array types

Dependent primitives and dependent types are currently not well supported. In particular, type inference needs to be properly implemented.

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.