Comments (3)
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.
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.
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)
- Remove marshal round-trip for native objects HOT 2
- JavaScript compatibility namespace
- Unmarshal received `this` when marshalling closures
- Nothing exported HOT 1
- Typing system struggles to extend global objects
- Update `constructor` in subclasses
- Recursive methods HOT 1
- More problems with `let` HOT 2
- Promises and asynchronous functions
- Add `complex` constructor HOT 1
- Add `neg` to negate numbers
- Rename `bool` to `boolean`
- Objects create an unexpected way of recurring HOT 2
- Stack Overflow in Type System
- Circular dependency
- Syntax errors reported on wrong tokens
- Fix arity of functions returning methods
- Error when trying to compile HOT 1
- Error in using require
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lambda.