Git Product home page Git Product logo

fuse's Introduction

Fuse Lang

Fuse is in development, NOT ready for production; We are at version sub 0.1.

Documentation | Roadmap | Lua Compatiblity

Giving a star to this project can go a long way in order to hit a sooner release date by putting us on the map for both possible contributors and sponsors to see.

struct Point
  x: number
  y: number
end

let point_a = Point { x: 10, y: 20 }
print("X: ${point_a.x}, Y: ${point_a.y}")

point_a.x = -10 // error, `point_a` is immutable

let mut point_b = Point { x: 10, y: 20 }
point_b.x = -10 // fine, `point_b` is mutable

Inspiration

The language itself is directly inspired by Lua, Rust, and TypeScript. There are also some ideas taken from Haskell, Elxir, and Kotlin among others. Fuse has started as an alternative to Luau that can compiler to Lua. However Fuse isn't advertised as a super-set of Lua; Instead, it is a separate language that can target different versions of Lua(including LuaJit and Luau), Comes with a minimal yet powerful standard library with zero-cost abstractions, Decent interoperability with the target runtime and a suite of tools such as compiler, linter, LSP, testing and a package manager all built into the fuse command.

Possible use-cases

Fuse is easy to learn while keeping most of the good techniques used in functional languages. It comes with immutable variables by default but has native support for mutability and also would allow you to define global variables. We also have an ownership system similar to Rust's borrow checker but it is much simpler since we have no lifetimes or references* to worry about. In addition to the features mentioned above we have exhaustive pattern matching and Optional types instead of exposing nil which would help with writing more safe code in general.

Because of our interoperability with Lua, we are aiming to provide a drop-in replacement for projects that are using Lua for scripting and extendability. It is also useful when writing libraries that need to be compatible with a range of different runtimes such as LuaJIT and Lua5.4.

While Lua doesn't support parallel programming, We have an async/await feature in our roadmap which would provide the much-needed concurrency to the ecosystem. Combined with the clear mutability checks and borrow checker we can extend our programs with concurrency without any major hassles.

*In Fuse everything other than primitives are reference types.

fuse's People

Contributors

rzvxa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.