{"id":21064878,"url":"https://github.com/reallyland/really-lang","last_synced_at":"2026-04-11T20:02:50.351Z","repository":{"id":98902337,"uuid":"155736158","full_name":"reallyland/really-lang","owner":"reallyland","description":"The Really Programming Language","archived":false,"fork":false,"pushed_at":"2018-11-07T12:05:33.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T20:53:03.082Z","etag":null,"topics":["async-await","fast","general-purpose","javascript","programming-language","really","really-lang","reasonml","rust","safe","single-threaded","web-api","webassembly"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reallyland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-01T15:29:46.000Z","updated_at":"2019-04-23T01:43:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ff53bed-ab60-49de-bad7-3161ac0ab57c","html_url":"https://github.com/reallyland/really-lang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyland%2Freally-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyland%2Freally-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyland%2Freally-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyland%2Freally-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reallyland","download_url":"https://codeload.github.com/reallyland/really-lang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243507814,"owners_count":20301902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","fast","general-purpose","javascript","programming-language","really","really-lang","reasonml","rust","safe","single-threaded","web-api","webassembly"],"created_at":"2024-11-19T17:52:26.883Z","updated_at":"2025-12-28T20:29:17.104Z","avatar_url":"https://github.com/reallyland.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# really-lang\n\n\u003e The Really Programming Language\n\nThe general purpose programming language you will ever need to learn and use. Heavily inspired by C, JavaScript, Rust, Kotlin, Dart, and any other programming languages you might use these days.\n\n## Features\n\n1. No `Null`, use `Option` type for better error handling.\n2. No `class inheritance`.\n3. Everything is immutable by default, use `mut` keyword for mutable variables.\n4. Statically typed programming language.\n5. Single threaded by default.\n\n## TO-DO\n\n1. To support compilation to Web Assembly.\n2. To support multithreading.\n4. To support Web APIs.\n\n## Syntax\n\n### Comments\n\n```ts\n/**\n * Multi-line\n * comments\n */\n\n/** Single line comment only */\n```\n\n### Variables\n\n```ts\n/** Type inferred */\nlet typeInferred = '100'; /** string */\n\n\n/** Unknown type */\nlet unknownType; /** unknown */\nunknownType = '100'; /** unknown -\u003e str */\n\n\n/** Compile Error! Unknown type should be temporary. */\nlet unknownType; /** unknown */\n\n\n/** Declaration with defined type */\nlet definedType: str = '100';\n\n\n/** Similar to `do` in some other languages */\nlet doVar: num = {\n  let a = 1;\n  let b = 2;\n  a + b\n};\n\ndoVar == 3;\n\n\n/** Async `do` */\nlet asyncDoVar: num = async {\n  let a = await 1;\n  let b = a * 2;\n  b\n};\n\nasyncDoVar == 2;\n\n\n/** Mutable variable */\nlet mut mutableVar = '100';\nmutableVar = '2';\n\n\n/** Mutable variable is mutable by value, not by type */\nlet mut mutableVar = '100'; /** str */\nmutableVar = 10; /** Compile error! */\n\n\n/** All variables are immutable by default */\nlet immutableByDefault = '10'; /** immutable string */\nimmutableByDefault = '1'; /** Compile error! */\n\n\n/** Referencing or borrowing */\nlet val = '10';\nlet borrowVal = \u0026val; /** \u0026str */\nlet mut mutableBorrow = \u0026mut val; /** \u0026mut str */\n\nborrowVal = '1'; /** Compile error! */\nmutableBorrow = '1'; /** `val` is now of value `1` */\n\n\n/** De-referencing */\nlet val = '10';\nlet borrowVal = \u0026val; /** `borrowVal` is just a reference to `val` */\nlet derefBorrowVal = *borrowVal; /** De-ref borrowed `val` */\n```\n\n### Primitives\n\n1. Arrays\n   \n   ```ts\n   let array: Array\u003cnum\u003e = [1, 1, 1];\n   let mixedTypeArray: Array\u003cnum|str\u003e = [1, '1', 0];\n   let inferredTypeArray: [1, '1', true]; /** Array\u003cstr|num|bool\u003e */\n   ```\n\n2. Objects\n\n    ```ts\n    let object = { first: 1, second: '2' };\n\n    /** Computed properties */\n    let a = 'first';\n    let computed = {\n      [a]: 1,\n    };\n    ```\n\n3. Strings\n\n    ```ts\n    let characterString = '1';\n    let longString = 'Hello, World!';\n    let emojiString: str = '👍';\n    ```\n\n4. Boolean\n\n    ```ts\n    let boolean: bool = true;\n    let numberBoolean: bool = 0;\n    ```\n\n5. Numbers\n\n    ```ts\n    let integer: num = 1;\n    let float: num = 1.1;\n    let numWithSeparators: num = 1_000_000;\n    ```\n\n6. Options\n\n    ```rs\n    let option: Option\u003cstring\u003e = Some('1');\n    let none: Option\u003cstring\u003e = None; /** `None` is an option type */\n    let inferredOption = Some(1);\n    ```\n\n7. Symbols\n\n    ```ts\n    let symbol: Symbol = Symbol('1');\n    let inferredSymbol = Symbol(1);\n\n    Symbol(1) != Symbol(1) /** Symbol is always unique */\n    ```\n\n8. Unknown\n\n    ```ts\n    let unknownVar; /** Unknown type variable is temporary */\n    unknownVar = '1'; /** `unknownVar` is now of type `str` */\n\n    let permanentUnknown; /** Compile Error! */\n    ```\n\n### Regex\n\n```ts\nlet regexp = /[a-z]/gi;\nlet regexp2: RegExp = /[a-z0-9]/;\n```\n\n### Ranges\n\n```py\nlet exclusiveRange = [0..2]; /** [0, 1] */\nlet inclusiveRange = [0...2]; /** [0, 1, 2] */\n\nfor (let i in 0...2) {\n  print(i);\n}\n\n/**\n * Output:\n * 0\n * 1\n * 2\n */\n```\n\n### Collections\n\n1. Map\n\n    ```ts\n    let map = Map { '1'=\u003e1, '2'=\u003e2 };\n\n    let map: Map\u003cstr, num\u003e;\n    map.set('1', 1);\n    map.del('1');\n    map.has('1');\n    map.keys(); /** Iterable\u003cnum\u003e */\n    map.vals(); /** Iterable\u003cnum\u003e */\n    ```\n\n2. Set\n\n    ```ts\n    let set = Set { 1, 2 };\n\n    let set: Set\u003cnum\u003e;\n    set.add(1);\n    set.add(2);\n    set.del(2);\n    set.has(1);\n    set.keys(); /** Iterable\u003cnum\u003e */\n    set.vals(); /** Iterable\u003cnum\u003e */\n    ```\n\n### Operators\n\n1. Arithmetic\n\n    ```ts\n    a + a\n    a - b\n    a * b\n    a / b\n    a % b\n    -a\n    a ** b\n    ```\n\n2. Bitwise\n\n    ```ts\n    a \u0026 b\n    a | b\n    a ^ b\n    ~a\n    a \u003e\u003e b\n    a \u003e\u003e\u003e b\n    a \u003c\u003c b\n    a \u003c\u003c\u003c b\n    ```\n\n3. Logical\n\n    ```ts\n    a \u0026\u0026 b\n    a || b\n    !a\n    ```\n\n4. Comparison\n\n    ```ts\n    a == b\n    a != b\n    a \u003e b\n    a \u003c b\n    a \u003e= b\n    a \u003c= b\n    a is b\n    is a\n    not b\n    ```\n\n### If-Else\n\n```ts\nlet a = if (true) {\n  'b'\n} else {\n  'c'\n};\n\nif (true) {\n  'a'\n} else if (a \u003e b) {\n  'b'\n} else {\n  'c'\n}\n```\n\n### Destructuring\n\n```ts\nlet [a, b] = [1, '1'];\nlet { a, b } = { a: 1, b: '1' };\n```\n\n### Rest/ Spread\n\n```ts\n/** Array\u003cnum\u003e */\nlet a = [1, 2, 3, 4];\nlet [b, ...c] = a;\n\nlet d = [b, ...a];\n```\n\n```ts\n/** Object */\nlet a = { b: 1, c: 2 };\nlet { b, ...c } = a;\n\nlet d = { ...a };\n```\n\n### Try-Catch-Finally\n\n```ts\ntry {\n  ...\n} catch (e is Option) {\n  ...\n} catch (e) {\n  ...\n} finally {\n  ...\n}\n```\n\n### Functions/ Closures\n\n```ts\n/** function declaration */\nfn a() { ... }\n\nasync fn b() { ... }\n\nlet a = () =\u003e { ... };\nlet a = () =\u003e { 'a' };\n\n\n/** Closure */\nlet b = '1';\nlet c = () =\u003e { b };\n\n\n/** Positional parameters */\nfn a(b: num, c: str) { ... }\nfn(1, '2');\n\n\n/** Named parameters */\nfn a(b: num, c: str) { ... }\na(c: '1', b: 2);\n\n\n/** Default parameters */\nfn a(b: num = 1) { ... }\na();\n\n\n/** Optional parameters */\nfn a(b: num, c?: bool) { ... }\na(1);\n\n\n/** Partial application */\nfn a(b: num, c?: bool) { ... }\n\nlet partialA = a(?, true);\n\npartialA(1);\n\n\n/** Iterators */\niter fn a() {\n  yield 1;\n}\n\niter fn b(tasks: Iterable\u003cnum\u003e) {\n  for (let i of tasks) {\n    yield i * 2;\n  }\n}\n\n/** Async iterators */\nasync iter fn c(tasks: Iterable\u003cnum\u003e) {\n  for (let i of tasks) {\n    let a = await doSomething(i);\n    yield a;\n    /** Alternatively, `yield await doSomething(i)` */\n  }\n}\n```\n\n### Futures\n\n1. Future\n\n    ```ts\n    let a = Future('1');\n    let a: Future\u003cbool\u003e = Future(true);\n\n    a.then(...).catch(...);\n    ```\n\n2. Async-Await\n\n    ```ts\n    let a = async () =\u003e { ... };\n    let a: Future\u003cbool\u003e = async () =\u003e { await ... };\n\n    async () =\u003e { await a; };\n    ```\n\n### Loops\n\n1. While\n\n    ```ts\n    while (true) {\n      ...\n    }\n    ```\n\n2. Do-While\n\n    ```ts\n    do {\n      ...\n    } while (true);\n    ```\n\n### Iterables\n\n```ts\n/** Iterable\u003cnum\u003e */\nlet a = [1, 2, 3];\nfor (let i of a) { ... }\n\n\n/** Iterable\u003cFuture\u003cnum\u003e\u003e */\nlet a = [Future(1), Future(2), Future(true)];\nfor await (let i of a) { ... }\n\n\n/** w/ destructuring */\nlet a = [\n  [1, 2],\n  [3, 4],\n];\nfor (let [a, b] of a) { ... }\n```\n\n### Pattern Matching\n\n```rs\nlet a = Some(1);\nmatch (a) {\n  Some(n) =\u003e { ... },\n  None =\u003e { ... },\n}\n\nlet b = true;\nmatch (b) {\n  is Future\u003cn\u003e =\u003e { ... },\n  is str =\u003e { ... },\n  not bool =\u003e { ... },\n  Some(n) =\u003e { ... },\n  _ =\u003e { ... }\n}\n\nlet c = match (b) {\n  ...\n};\n```\n\n### Modules\n\n1. Import\n\n    ```ts\n    /** Only public fields, methods can be imported */\n    import a from 'a.rl';\n    import a, b, c from 'b.rl';\n\n    import a as b from 'a.rl';\n    import a as b, b as c from 'a.rl';\n\n    import 'a.rl';\n    import 'a.rl', 'b.rl';\n    ```\n\n2. Export\n\n    ```ts\n    /** Fields, methods are private by default, unless being exported */\n    fn a() { ... }\n    fn b() { ... }\n\n    export a;\n    ```\n\n    ```ts\n    /** Exported fields and methods are public by default */\n    fn a() { ... }\n    fn b() { ... }\n    let c = 100;\n\n    export a, b, c;\n    ```\n\n### Optional chaining w/ Nullish Coalescing\n\n```ts\nlet a = {\n  a: [\n    {\n      b: [1, true]\n    }\n  ]\n};\n\na?.b?.c?.0\na?.c?[0]?.['c']\n\na?.b?.0 ?? 100 /** Fallback to `100` if `None` */\n```\n\n## Type Syntax\n\n### Basic Types\n\n1. Boolean `bool`\n2. String `str`\n3. Number `num`\n4. RegExp `RegExp`\n5. Symbol `Symbol`\n6. Array\u003cT\u003e `Array\u003cnum|bool\u003e`\n7. Object `{}`\n8. Iterable\u003cT\u003e `Iterable\u003cnum\u003e`\n9.  Map\u003cT, U\u003e `Map\u003cstr, num\u003e`\n10. Set\u003cT\u003e `Set\u003cnum\u003e`\n11. Option\u003cT\u003e `Option\u003cstr\u003e`\n12. Future\u003cT\u003e `Future\u003cbool\u003e`\n13. Unknown `unknown`\n\n### Optional Types\n\n```ts\nlet a?: string;\n\na is None;\n```\n\n### Function Types\n\n```ts\ninterface FnA {\n  (): bool;\n}\n\nfn a(): FnA {\n  true\n}\n```\n\n### Generics\n\n```ts\ninterface Result\u003cT, U\u003e {\n  data?: T;\n  error?: U;\n}\n\nlet a: Result\u003cstr, str\u003e;\n```\n\n### Unions\n\n```ts\ntype TypeA = str | num;\ninterface IB\u003cT\u003e {\n  data: T;\n}\n\nlet a: IB\u003cTypeA\u003e;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freallyland%2Freally-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freallyland%2Freally-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freallyland%2Freally-lang/lists"}