Code Monkey home page Code Monkey logo

Comments (3)

71104 avatar 71104 commented on July 29, 2024

This is actually mandatory because lists are not well suited to specify the arguments for native functions because they have uniform inner type. When the type system is activated, it will no longer be possible to specify heterogeneous arguments to native functions. Therefore, tuples must be used.

Marking this as a bug.

from lambda.

71104 avatar 71104 commented on July 29, 2024

Tuple types must always be included in round brackets, otherwise the commas would create an ambiguous syntax:

fn x: string, string -> ...

The above is actually not ambiguous in current versions of Lambda because string is a keyword and can't be used as a parameter name, but the parser for that wouldn't be easy to implement. It is way better to disambiguate like this:

fn x: (string, string) -> ...

from lambda.

71104 avatar 71104 commented on July 29, 2024

TODO list:

  • deconstructions,
  • operators,
  • string formatting.

Operators can only be applied on tuples of the same arity. Applying an operator to a pair of tuples is equivalent to applying it to each pair of elements.

from lambda.

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.