About نفطه

Naftah is a programming language that brings the Arabic language into modern programming, aiming to make code more natural and expressive for Arabic-speaking developers.

نفطه هي لغة برمجة تهدف إلى جلب اللغة العربية إلى البرمجة الحديثة، لتجعل كتابة الشيفرة أكثر طبيعية ووضوحاً للمطورين الناطقين بالعربية.


🌟 Motivation: Why I Created Naftah

As a Tunisian and an Arabic speaker passionate about programming, I was always searching for a programming language that uses Arabic naturally — not just in keywords, but in structure, logic, and support for dialects, including my own Tunisian dialect. I wanted something that makes programming feel familiar, intuitive, and accessible, especially for those of us who don’t speak English fluently.

But after years of searching, I found that no existing Arabic programming language truly met those needs. Most were limited, overly simplistic, or not designed with real-world learning and development in mind. None of them made me feel like I could write code the way I speak and think in Arabic.

What pushed me even more was seeing how many people around me — students, kids, and even adults — struggle to learn programming not because it’s too hard, but because of the language barrier. Most programming resources, documentation, and languages are in English. And for many, especially young kids, this makes it almost impossible to start.

You shouldn’t have to learn a foreign language just to learn how to think logically or create something with code.

That’s why I created Naftah — a modern, expressive, and educational programming language written entirely in Arabic, with built-in support for dialects, including Tunisian Arabic. Naftah allows people to write code in a way that feels close to how they speak, think, and understand the world around them.

I built Naftah using the best ideas and syntax patterns from popular programming languages, blending them with the richness of the Arabic languageand the diversity of dialects. My goal is to make programming accessible to everyone, regardless of their level of English.

Naftah is not just a language. It’s an invitation to learn, explore, and build — in our own words.


بصفتي تونسيًّا ناطقًا باللغة العربية ومحبًا لعلم البرمجة، لطالما كنت أبحث عن لغة برمجة تعتمد اللغة العربية بشكل طبيعي — ليس فقط في الكلمات المفتاحية، بل في البنية والأسلوب، وتدعم حتى اللهجات المحكية، بما في ذلك اللهجة التونسية التي أعبّر بها يوميًا.

كنت أريد لغة تجعل البرمجة أقرب للفهم، وأسهل للتعلّم، وأكثر ألفة، خصوصًا لأولئك الذين لا يُجيدون الإنجليزية بطلاقة. لكن بعد سنوات من البحث، لم أجد لغة برمجة عربية تلبي هذه الحاجة بجدّية. معظم ما وُجد إما بسيط للغاية، أو غير عملي، أو لا يدعم التعليم بشكل فعّال، ولم أشعر يومًا أن بإمكاني “كتابة كود” كما أفكر وأتحدث باللغة العربية.

ما دفعني أكثر هو الواقع المؤلم الذي أراه حولي: أشخاص كثيرون — طلاب، أطفال، حتى بالغون — يعانون في تعلّم البرمجة، ليس لصعوبتها ذاتها، بل بسبب حاجز اللغة. معظم المصادر والمفاهيم البرمجية مكتوبة بالإنجليزية، وهذا يجعل التعلّم أشبه بالمستحيل بالنسبة للأطفال أو من ليست لديهم خلفية لغوية قوية.

لا ينبغي أن يكون تعلّم البرمجة مرهونًا بإتقان لغة أجنبية.

لذلك قررت إنشاء “نفطه” — لغة برمجة حديثة، معبّرة، وتعليميّة، مكتوبة بالكامل باللغة العربية، وتدعم اللهجات أيضًا، بما في ذلك اللهجة التونسية. تهدف “نفطه” إلى تمكين الجميع من كتابة الكود كما يتحدثون ويفكرون ويفهمون.

لقد بنيت “نفطه” اعتمادًا على خبرتي في البرمجة، وأخذت من لغات البرمجة العالمية أفضل المفاهيم، والبنى، وأنماط الكتابة، ثم صغتها بالعربية، بأسلوب يجعل التعلّم والتطوير أكثر قربًا وسلاسة.

نفطه ليست مجرد لغة، بل هي دعوة مفتوحة للتعلّم، والاكتشاف، والإبداع — بلغتنا، وعلى طريقتنا.


⚙️ Why Build Naftah on Top of Java (JVM)?

One of the most important decisions in designing a new programming language is choosing the right foundation. For Naftah, that foundation is the Java Virtual Machine (JVM) — and that choice was very intentional.

The JVM is one of the most mature, stable, and high-performance platforms in the world of software development. By building Naftah on top of the JVM, we gain access to decades of engineering, optimization, and innovation, while making sure Naftah remains:

🚀 Benefits of the JVM for Naftah

✅ Massive Ecosystem

Java has one of the largest and most battle-tested ecosystems out there. By using the JVM, Naftah can interact with thousands of existing Java libraries, APIs,…

🛠️ Performance & Optimization

The JVM is highly optimized for performance, thanks to JIT (Just-In-Time) compilation, garbage collection, and decades of improvements.

Naftah code runs with the speed and efficiency of Java code, making it suitable not just for education, but also for real-world applications.

🔗 Full Interoperability with Java

Naftah is fully interoperable with the Java ecosystem, making it an ideal gateway language for Arabic speakers entering the world of modern software development.

✅ What This Means:

🧩 Write Java, Use It in Naftah — Seamlessly

Thanks to Naftah’s plugin discovery system based on reflection, you can:

🔠 You can even transliterate Java code to feel like Arabic

Want to write Java that looks like Naftah code? You can do that too:

@NaftahFn(
		name = "إجمع",
		description = "يجمع رقمين",
		usage = "إجمع(أ ، ب)",
		parameterTypes = {int.class, int.class},
		returnType = int.class
)
public static int sum(int a, int b) {
	return a + b;
}

This code:

إطبع("مجموع ١ و ٢ هو: " + إلى_نص(إجمع(1، 2)))

🚀 Why This Matters

Whether you’re teaching children, building local apps, or writing serious libraries — Naftah gives you a voice in your language, and the power of the Java world behind it.

🌐 Portability

The JVM is cross-platform by design: Code written in Naftah runs on Windows, macOS, Linux, and even on mobile devices via JVM-compatible platforms.

This means developers can build once and run anywhere.

🧠 Why Not Build a New VM From Scratch?

Building a virtual machine from scratch is possible, but it takes years of effort, and the result may lack performance, stability, or community adoption.

By standing on the shoulders of a giant like the JVM, Naftah gets:

We didn’t want to reinvent the wheel — we wanted to drive it in our direction.


🧩 Java/Kotlin/Groovy Interoperability

Naftah allows full access to Java libraries:

This makes Naftah a gateway language — start in Arabic, scale into Java as needed.