Coder Social home page Coder Social logo

fjord's Introduction

Fjord

Fjord is a strict programming language that compiles to JavaScript.

Features

  • JavaScript interop via .d.fj-definition files, a human-readable format that uses the same type notation as Fjord to describe the types of JavaScript dependencies.
  • Enum types, also known as algebraic data types or (disjoint) union types. Like Scala 3 and Rust, Fjord uses the enum keyword to declare a type with multiple data constructors.
    • Pattern matching on enum types.
  • Custom operators with precedence based on the first token, like Scala.
  • Primitive value types
    • Integer type and integer literals
    • String type and string literals
    • Floating-point value literals.
    • Array type and array literals.
    • Escaped characters in string literals.
  • Modules.
    • Importing all members of another module into the global scope.
    • Selectively importing functions, operators, and types from other modules.
    • Aliasing imported functions, operators, and types.
    • Aliasing imported modules.
  • Tuples.
    • Type-system support.
    • Tuple value construction.
    • Destructuring in let bindings.
  • Implicit values.
    • Resolution of concrete and polymorphic types.
    • Higher-order implicit value construction.
  • Records, also known as structs, containing named data fields.
    • Shared record field access.
    • Record destructuring in let bindings.
    • Type and lifetime-safe record mutation.
  • Typed holes, ?-prefixed identifiers where the compiler tells you what type of value it is missing for that identifier.
  • Lifetime checking for sharing unique values safely, especially in partially applied or curried functions.
  • Compiler optimizations for common patterns in functions and data structures.
    • Inline functions when deemed appropriate.

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.