Skip to content

Introduction to Sad Language

Sad (لغة ص) is a modern, open-source Arabic programming language designed so developers can write code in their native Arabic language.

Why Sad?

Programming in your native language leads to faster understanding and deeper expression. Sad removes the language barrier between Arabic developers and their code.

sad
# مرحباً! This is real Arabic code
متغير رسالة = "أهلاً بلغة ص!"
اطبع_سطر(رسالة)

Key Features

Native Compiler (via LLVM) — the only engine

bash
sad-build my-program.ص -o my-program
./my-program

Sad has no interpreter and no bytecode VM: your code is compiled to a native executable, so a program behaves one way because one engine runs it.

Bilingual Code Support

sad
# Mix Arabic and English freely
متغير myList = [1، 2، 3]
لكل item في myList
  اطبع(item)
نهاية

Language Keywords

Sad uses Arabic keywords:

Sad KeywordEnglish Equivalent
دالةfunction
متغيرvar/let
ثابتconst
إذاif
وإلاelse
بينماwhile
لكل ... فيfor each ... in
ارجعreturn
صنفclass
يرثextends
بانيconstructor
هذاthis
جديدnew
نهايةend (closes blocks)
اطبعprint (builtin)
صحيح / خطأtrue / false
لاشيءnull

Next: Installation →

Released under MIT License