Introduction to Soplang

Welcome to the official documentation for Soplang, a Somali-first programming language that makes coding intuitive, inclusive, and accessible.

What is Soplang?

Soplang (short for Somali Programming Language) is a culturally-rooted programming language designed and developed by Mr Sharafdin (Sharafdin Yusuf Sharafdin). It allows developers to write code in native Somali syntax using familiar keywords, expressions, and structures — making programming feel natural and accessible.

Language Goals

  • Simplicity: Clean, easy-to-read syntax designed to make programming concepts clear and approachable.
  • Education: Built with learners in mind, making programming accessible to students and new developers.
  • Localization: Native Somali throughout, embracing Somali language and cultural context in programming.
  • Accessibility: Removes English-language barriers, opening programming to a wider audience of Somali speakers.

Current Version: Soplang 2.0

Key Features

  • Dual Typing: door for dynamic, tiro, qoraal, etc. for static typing flexibility.
  • Object-Oriented Programming: Full support for OOP with fasalka, ka_dhaxal, cusub, nafta.
  • Control Flow: Clean syntax for conditionals (haddii, haddii_kale, haddii_kalena) and loops (ku_celi, inta_ay).
  • Error Handling: With isku_day, qabo for robust error management.
  • Package Manager: Coming soon via the sop CLI.
  • Standard Library: Includes Math, File System, Network, and Date/Time modules.
  • Interpreter: Python-based (compiler planned for future release).

Example Code

example.sop
// Hello World
qor("Hello, World!")

// Variables
door name = "Faarax"
qoraal title = "Soplang Developer"
tiro age = 10

qor("Name: " + name)
qor("Title: " + title)
qor("Age: " + qoraal(age))

// Function
howl greet(person) {
    soo_celi "Hello, " + person + "!"
}
qor(greet(name))

// If/Else
haddii (age > 18) {
    qor("You are an adult")
} haddii_kalena {
    qor("You are underage")
}

// For Loop
ku_celi i min 1 ilaa 5 {
    qor(i)
}

// While Loop
tiro counter = 5
inta_ay (counter > 0) {
    qor(counter)
    counter = counter - 1
}

qor("Done!")

Tooling

CLI Tool (sop)

For running code, managing projects, and package management.

VS Code Extension

Syntax highlighting, inline docs, and code execution.

REPL (Interactive)

Terminal-based environment with history and highlighting.

sopScript (Browser Runtime)

For online execution and learning demos.

Getting Started

Ready to dive in? Here are some resources to help you get started with Soplang:

Community & Contribution

Soplang is open-source under the MIT License. Everyone is welcome to contribute to its development!