COMPILERS · STATIC TYPING · PROGRAMMING LANGUAGE
DinarScript
A custom programming language with static typing and pattern matching.
Overview
DinarScript is a custom programming language inspired by the Kuwaiti Dinar and designed to combine technical structure with identity and creativity. The project explored the idea of turning currency into code by building a language that felt both technically rigorous and visually distinct from traditional programming languages.
Built using JavaScript, Node.js, and Ohm, DinarScript features static typing, typed functions, pattern matching, records, control flow structures, and compile time semantic analysis. One of the language’s most unique features is its native Kuwaiti currency system, which supports KD and fils literals directly inside the language itself. Currency values can be compared, stored in records, used in pattern matching, and manipulated similarly to native data types.
A large part of the project focused on compiler safety and static analysis. During compilation, DinarScript performs checks for invalid operations, undeclared identifiers, incorrect function usage, invalid field access, incompatible types, and improper Boolean conditions. These checks were designed to help catch errors before runtime and make programs more reliable and easier to reason about.
Beyond the compiler itself, the project also expanded into branding and presentation through the development of an interactive website created to showcase the language’s syntax, design philosophy, and overall identity. The site focused heavily on minimal black and gold aesthetics, interactive examples, and modern presentation design to make the language feel both technical and visually memorable.
DinarScript was developed independently and became both a technical compiler project and a creative exploration of how programming languages can reflect culture, branding, and identity while still maintaining strong compiler design principles and modern language features.
Looking ahead, DinarScript could be improved by expanding its standard library, adding richer developer tools, improving error messages, and introducing more practical examples for business and financial use cases. Since the language is inspired by the Kuwaiti Dinar, it could also be adapted for Kuwait focused applications such as payment simulations, accounting education, financial reporting examples, and beginner friendly programming lessons that connect coding concepts with a familiar local context.
Key Features
Technologies
Best experienced on desktop for full interactivity.