Giter VIP home page Giter VIP logo

ion's Introduction

Ion language

A language implemented in C# using LLVM 5.0 bindings.

File extension: .ion

Syntax examples coming soon.

Core principles

  1. Simplicity. The language should be simple, or as powerful as the programmer wishes. This means that some symbols and patterns are optional and infered by the compiler.

  2. Flexible. The language should contain tools and shortcuts to make the programming experience smooth, not rigid. Pipes are the best example of a planned feature that will add flexibility in the development environment.

An example usage of pipes:

...
"Hello %s", "world!" | printf;

// Is equivalent to:

printf("Hello %s", "world!");
...
  1. Built-in DOM support.

Inspired by React.js' JSX syntax, the language will have built-in DOM and HTML support.

int Main() 
{
    Web.mount(<div>Built-in HTML syntax is awesome!</div>);

    return 0;
}

This feature, along with decorators & anonymous functions, will come super handy when building APIs!

str @name = "John Doe";

@Web.route("/") {
    return <p>Hello, {@name}.</p>; // Hello, John Doe.
}
  1. Portable.

Development roadmap

  • Basic control flow (if, else)
  • Pipes
  • Expressions
  • Functions
  • Entity visibility
  • Classes
  • Interfaces
  • Structures
  • Decorators
  • Anonymous functions
  • Object blueprints
  • Async support
  • Delegates
  • JSON integration + support
  • External definitions
  • Import functionality
  • Advanced flow control (switch, etc.)
  • Package manager
  • Package definition (package manager)
  • Web API
  • Built-in DOM support
  • Compilation to JavaScript
  • Syntax highlighting (Visual Studio Code)
  • Cross-platform installer utility
  • Self-hosted codebase

Naming convention

  1. Functions.

All functions should be in PascalCase.

void Main()
{
    //
}
  1. Classes.

Class names should be in PascalCase, and members in camelCase.

import Core.Console;

class Example
{
    pub str name = "John Doe";

    void SayHello()
    {
        Console.Log("Hello, " + this.name);
    }
}
  1. Attributes.

Attributes are considered proxy functions, thus they should be treated as functions and be named in PascalCase.

@Transform(0)
int Main()
{
    // Return value will be transformed to '0'.
    return 1;
}

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.