Giter VIP home page Giter VIP logo

lainoa's People

Contributors

uesteibar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lainoa's Issues

Implement Maps

Maps should be supported:

let map = {
  "key": "value",
  123: "key can be int, bool or string",
}

map["key"] # => value

Constants

const a = "can't change this"
a = true

ERROR: can't change value of constant a

Async - Await

We can implement async-await easily using goroutines:

let ref = async(fun() { return true })
let result = await(ref)

puts(result) # => true

ref will be a new type that wraps a go channel

Modules

let Math = mod {
  pub add = fun(a, b) { sum([a, b]) }

  priv sum = fun(nums) { ... }
}

We can use priv for functions that can't be used outside of the module.

Add `lainoa format` command

it expects a list of files

> lainoa format ./*.ln

and it formats those files. The process is simple:

  1. Read the file
  2. Build the ast program
  3. write program.String() to the file

it won't be configurable at all.

Pipe operator

It would be great to have a pipe operator like the one in elixir:

let add = fun(a, b) { a + b }

5
>> add(10) # => 15
>> add(15) # => 30

The expression on the left should be the first argument to the function call on the right

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.