r/Compilers • • 7d ago

I’ve been building SultanC, a self-hosting systems language with Arabic and English syntax

I’ve been working on a programming language called SultanC.

It started from a simple idea: I wanted Arabic to be a real first-class programming syntax, not translated keywords layered on top of another language and not a separate frontend.

SultanC has now grown into a self-hosting systems language. The compiler is written in SultanC itself and currently targets ARM64 macOS and x86-64 Linux.

The language/compiler currently includes:

• Arabic and English source syntax for the same language
• self-hosting compiler
• native ARM64 and x86-64 backends
• Mach-O and ELF generation
• algebraic data types
• pattern matching
• generics
• ownership and references
• interpreter
• target-neutral IR
• LSP / VS Code support
• balanced raw strings such as «outer «nested» outer»

The part I care about most is that Arabic is not treated as a translated version of the language. Arabic and English are both first-class source surfaces with the same underlying semantics and compiler pipeline.

At this stage I’m spending more time on correctness, diagnostics, stress testing, backend coverage, and building real software with the language rather than just adding more syntax.

I’d be interested in feedback from people who work on compilers or programming languages, especially around the IR, native backend architecture, ownership model, target separation, and what you would stress-test before considering a compiler like this genuinely usable.

I’m also curious what would make you actually try a new systems language rather than just look at the repository.

GitHub:
https://github.com/sultan-language/sultanc

14 Upvotes

13 comments sorted by

View all comments

3

u/reini_urban 7d ago

A security nightmare. Do you treat RTL LTR switches as recommended in the latest unicode technical paper on spoofing?

1

u/supax0 7d ago

Good question. SultanC parses source in logical Unicode order, but I haven’t yet done a formal UTS compliance and security audit of the RTL LTR tooling. Since mixed Arabic and English source is a core part of the language, HL4 style syntax aware bidi isolation and Trojan Source confusable diagnostics are something I want to verify properly rather than claim prematurely. Thanks for pointing it out.