GithubHelp home page GithubHelp logo

aiden01 / arlia Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.26 MB

A new object-oriented language, adopting functional concepts, and whose goal is to solve most problems while being a robust alternative to other languages and frameworks

License: Apache License 2.0

F# 100.00%

arlia's Introduction

The Arlia programming language

Arlia icon, designed by Mesabloo

Introduction

Arlia is a pragmatic functional and semi-object oriented programming language for general use and will benefit, in the future, from the hyper-framework "Charm", itself written in Arlia.

Goals

Arlia wants to be a pretty, pleasant and readable language offering many possibilities in the world of programming, adopting concepts and concepts interesting to use for any type of project.

Features

  • Algebraic types ;
  • Higher order functions;
  • Partial immutability ;
  • Lambda expressions;
  • Generic types ;
  • Static types ;
  • Type inference ;
  • Type class ;
  • Pattern matching;
  • Recursion ;
  • Exception handling ;
  • String interpolation ;
  • Interfaces
  • Matrix operations.

Project status

Arlia is in full development. There may be some significant changes, but the language and its objectives will be met during the alpha versions. The current version is the version 0.01. Indeed, the language and its implementation are still very young.

The Charm hyper-framework

The hyper-framework Charm is a collection of mini-framework of all kinds for various uses, including elementary IO management tools, as well as GUI creation and simulation / motion / sound elements, and also projecting a framework for artificial intelligence, via deep learning. Web tools are also being considered, as well as database management tools. Arlia, and her elementary functions will of course be able to use this past of Charm. But Charm is an essential tool for projects of all kinds. Note: Charm will be implemented after the language creation, be patient!

Web site

Visit the official Arlia fundation website.

About the author

I am a young student, very interested in the computer field, and especially in programming languages and artificial intelligence. I am alone on this project, but I sincerely hope that others will like it and that others will contribute to it.

Functional and object Hello World

import charm.dio

type Greeter(private name: String) {
   func greet() {
      printfn("Welcome " ^ name ^ "!")
   }
}

let greeter = new Greeter("John")
greeter.greet()

Functional fibonacci with exception

// A single constructeur type. The parameters are considered as the object fields.
// This type is a pseudo-exception type, internally there are other exceptions.
type Exception (msg: String)

// A sum type, which represents the result. Either `Success` or `Failure`.
type Result =
    | Success (Integer)    // Takes an `Integer`
    | Failure (Exception)  // Takes an `Exception`

// A function that takes an `Integer` (type inference) and returns a `Result`.
let fibonacci n -> Result =
    match n with
    | 0 -> Success 0
    | 1 -> Success 1
    | n -> Success (fibonacci(n - 1) + fibonacci(n - 2))
    | _ -> Failure (new Exception("Can't execute function")) // Exception with an unknown value, NaN for example.

try fibonacci 23 with // We "try" to combine the result of the function with these different possibilities:
    | Success value -> 
            printfn "Value: " ^ value.string() // Displays the value.
    | Failure exception ->
            printfn "Error: " ^ exception.msg  // Displays the error message.

Contribute!

The language is still very young, maybe you have found some flaws in the design? Feel free to fork the project, or to suggest improvements or submit comments via the project issues.

arlia's People

Contributors

vanaur avatar

Stargazers

 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.