A programming language (WIP)

Overview

Umo programming language

Concept

  • Effect system (not implemented)
  • Subtyping (not implemented)
  • Opt-in shared mutability (not implemented)
  • Gradual typing (not implemented)

Expressions

Comment (not an expression though)

Currently // comment is implemented

Primary

  • Parentheses: 1 + (2 + 3)
  • Identifiers
  • Numbers

Primary -- Identifiers

Currently /[a-zA-Z_][a-zA-Z_0-9]*/

Primary -- Numbers

  • Decimal integer: /\d+/ (octal-like numbers like 018 may be forbidden later)
  • Hexadecimal integer (not implemented)
  • Octal integer (not implemented)
  • Binary integer (not implemented)
  • Decimal floating-point number /\d+\.\d+/

Call/Member expressions

  • Call expressions: foo(bar, baz)
  • Member expressions: foo.bar (not implemented)

Call/Member expressions -- Call expressions

  • Empty arguments: foo()
  • Non-empty arguments: foo(bar, baz)
  • Trailing comma: foo(bar, baz,)

Operators

  • Additive: +, - (Only + is implemented now)
  • Multiplicative: *, / (not implemented)
  • Relational: <, <=, >, >= (not implemented)
  • Equality: ==, != (not implemented)
  • Logical: &&, || (not implemented)
  • Bitwise: &, |, ^ (not implemented)
  • Shift: <<, >> (not implemented)
  • Unary: -, ! (not implemented)

Note on types:

  • Arithmetic operators: different types cannot be mixed together.

Closures

  • Closure: |x| x * 2 (not implemented, subject to change)

Statements

Expression statements

Expression + ; is an expression statement.

(; may be auto-inserted in the future)

Let statements

let <ident> = <expr>;
let <ident>: <type> = <expr>;

The identifiers are in scope after the statement.

Scoping

The expression in the let statement can reference variables declared before the statement. Especially, it cannot reference variables declared in the statement itself.

// error
let f = |x| f(x);

This rule is not implemented yet and subject to change.

Types

  • Primitive types: int, f64, ... (only int and f64 are implemented now)
  • Placeholder type called Ambiguous (Ambiguous<Lo, Up>) ... corresponds with any in TS.
    • the corresponding syntax is not implemented yet.
  • TBD

Development

Concept:

  • Document-first
  • Test-first

Prototype will be written in TypeScript

You might also like...

An enhanced VSCode extension for the Move programming language.

Move Analyzer Plus Provides language support for the Move programming language. Install on the VSCode Extension Marketplace: Move Analyzer Plus on the

Aug 12, 2022

Simple JSON parse/stringify for the Wren programming language

wren-json Simple JSON parse/stringify for the Wren programming language. Parses strict json and relaxed json Comments Unquoted keys Trailing commas St

May 18, 2022

The interpretation implementation implemented programming language built for fun. I'm currently boring in full stack web development. So, I crafted this one LoL. 👻

The interpretation implementation implemented programming language built for fun. I'm currently boring in full stack web development. So, I crafted this one LoL.  👻

What's Wuttyi? Everything is expression 👻 I just developed this tiny programming language because of boring in higher level programming construct. Mo

Dec 13, 2022

Simple Math Programming Language (SMPL) for the Web

Simple Math Programming Language (SMPL) for the Web SMPL is a math-oriented programming language that can be interpreted in the browser. Its primary u

Dec 15, 2022

A type programming language which compiles to and interops with type-level TypeScript

Prakaar Prakaar (hindi for "type") is a type programming language which compiles to and interops with type-level TypeScript. Prakaar itself is also a

Sep 21, 2022

A probabilistic programming language based on pattern-rewriting

A probabilistic programming language based on pattern-rewriting

MJr-compiler MJr is a probabilistic programming language based on pattern-rewriting, heavily inspired by MarkovJunior by Maxim Gumin. This project pro

Dec 15, 2022

This is a boilerplate for creating your own languages for various use cases. You can even create your own programming language from scratch!

Bootstrap compiler This is a bootstrap compiler that can be used to compile to compiler written in the target language. You can write a compiler in th

Nov 14, 2022

This is a project that is in partial fulfillment of our CSCI 318 - Programming Language Concepts class of the Fall 2022 semester in New York Institute of Technology

StreetEasier A hub to search for apartments and roommate matching This project was bootstrapped with Create React App. Want to Test Yourself? 1.) Clon

Dec 5, 2022

The repository shows the compiler (simulator) of the Little Man Computer, which also contains some programs in the LMC programming language for implementing different functions.

Little Man Computer The repository shows the compiler (simulator) of the Little Man Computer, which also contains some programs in the LMC programming

Nov 17, 2022
Owner
Masaki Hara
Software Engineer at @wantedly
Masaki Hara
Cookbook Method is the process of learning a programming language by building up a repository of small programs that implement specific programming concepts.

CookBook - Hacktoberfest Find the book you want to read next! PRESENTED BY What is CookBook? A cookbook in the programming context is collection of ti

GDSC-NITH 16 Nov 17, 2022
Write "hello world" in your native language, code "hello world" in your favorite programming language!

Hello World, All languages! ?? ?? Write "hello world" in your native language, code "hello world" in your favorite language! #hacktoberfest2022 How to

Carolina Calixto 6 Dec 13, 2022
âš¡ Extremely fast online playground for every programming language.

Riju Riju is a very fast online playground for every programming language. In less than a second, you can start playing with a Python interpreter or c

Radon Rosborough 845 Dec 28, 2022
Programming language makes by hobby <3

Joule Programming language makes by hobby <3 About It's a compiled programming language written in JavaScript :/. Codes compile into Assembly code tha

null 6 Feb 17, 2022
VSCode extension for the rickroll-lang programming language (incomplete)

Rickroll-Lang VSCode Extension The Rick Roll programming language is a rickroll based, process oriented, dynamic, strong, esoteric programming languag

Siddhesh Zantye 6 Oct 10, 2022
A Flow-based programming language for universal applications.

Hlang A Flow-based programming language for universal applications. Hlang aims to make programming easier, faster and more comfortable. It avoids codi

HSET 5 Dec 25, 2022
Jaksel Script, Programming language very modern and Indonesian style

Jaksel Script Jaksel Script is a new programming language, very modern, easy to learn, using Indonesia-slang language. No programming experience requi

Rio Chandra 823 Jan 3, 2023
The Javascript and canvas port of MarkovJunior : A Probabilistic Programming Language.

MarkovJunior.js MarkovJunior is a probabilistic programming language where programs are combinations of rewrite rules and inference is performed via c

nullday 17 Nov 15, 2022
One-stop Go+ programming language environment manager

InGop (Go+ language) One-stop Go+ programming language environment manager How do I learn the Go+ programming language quickly? Start with installatio

uiuing 15 Nov 21, 2022