{"id":28390998,"url":"https://github.com/derpius/mlang","last_synced_at":"2025-07-11T22:06:02.479Z","repository":{"id":45277810,"uuid":"441606160","full_name":"Derpius/MLang","owner":"Derpius","description":"Modern alternative to Expression 2 and StarfallEx","archived":false,"fork":false,"pushed_at":"2022-07-17T21:21:23.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T17:55:41.614Z","etag":null,"topics":["garrysmod","lua","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Derpius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-25T04:51:28.000Z","updated_at":"2022-01-04T08:06:47.000Z","dependencies_parsed_at":"2022-09-14T05:10:16.607Z","dependency_job_id":null,"html_url":"https://github.com/Derpius/MLang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Derpius/MLang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FMLang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FMLang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FMLang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FMLang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Derpius","download_url":"https://codeload.github.com/Derpius/MLang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FMLang/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261909259,"owners_count":23228775,"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":["garrysmod","lua","programming-language"],"created_at":"2025-05-31T07:30:42.366Z","updated_at":"2025-07-11T22:06:02.469Z","avatar_url":"https://github.com/Derpius.png","language":"Lua","readme":"# NOTICE\nMLang has been in development on and off privately for the past year as a standalone parser, written in Python, to get the general idea of how the language should work  \nThis repository will contain the actual implementations of MLang, starting with the Lua GMod addon  \n\nNote that most of this readme talks about future features and plans as though they're implemented, MLang is not currently usable but has been thought out and tested in the standalone implementation mentioned above  \n\nThe purpose of making this repo public early is to get feedback on the non-prototype version of MLang before everything is set in stone  \n\n# MLang\n\nMLang (or Multi Language) is a statically typed programming language designed to be easily extendable, embeddable, and familiar to existing programmers while simultaneously being easy for novices.  \nNote that this is not meant to be a full blown widely supported language, instead it's an improved alternative to Expression 2 and StarfallEx with as much future proofing as possible.  \n\n*The name comes from the fact it's a mix of ideas and paradigms of various other languages.*  \n\n## Why MLang?\n\nMLang gives both the improved performance of StarfallEx and the static typing of E2, in a far more well designed, feature rich, and modern package.  \nI also plan to implement MLang as a binary module, giving multithreading and GPU capabilities to the language, allowing users to learn a single language for multiple applications.  \n\nFrom the back end it provides an extremely flexible and easy to use extension system, by default adding runtime typechecking wrappers to an extension's functions, \nwith the ability to disable them for increased performance once type safety has been tested.  \n\n### Benefits over Expression 2\n* Significantly better performance\n* Well written\n* Full class system and overall more refined implementation of static typing and OOP\n* Clientside code execution\n\n### Benefits over StarfallEx\n* Type safety\n* More concrete OOP\n* **(CURRENTLY UNTESTED BUT THEORETICALLY TRUE)** Heavy use of compile time checks allowing for less runtime overhead (minor performance increase)\n\n## Complex Syntax Example\n```cpp\nclass Example\u003cT\u003e {\n\tprivate T privateMember;\n\tpublic num i = 8;\n\n\tExample(T constructorParam) {\n\t\tself.privateMember = constructorParam;\n\t}\n\n\t// Return types implicitly the same as the class declaration above\n\t// Separate functions for reversable operands (will look for an op on lhs first, and if not present will check rhs)\n\toperator +(Example\u003cT\u003e a, num b) {\n\t\treturn a.num + b;\n\t}\n\toperator +(num b, Example\u003cT\u003e a) {\n\t\treturn a.num + b;\n\t}\n}\n\nnum MakeExample(num n) {\n\treturn Example\u003cnum\u003e(n).i;\n}\n\nnum MakeExample(string s) { // function overloads (same method reversable operators use)\n\treturn Example\u003cstring\u003e(s).i;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderpius%2Fmlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderpius%2Fmlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderpius%2Fmlang/lists"}