Introduction to Soplang
Welcome to the official documentation for Soplang, a modern programming language inspired by Python that combines simplicity, readability, and performance.
What is Soplang?
Soplang is a high-level, general-purpose programming language designed with a focus on code readability and developer productivity. It takes inspiration from Python's clean syntax while introducing performance optimizations and modern language features.
Key Features
- Clean, Readable Syntax: Soplang uses indentation to define code blocks, making your code clean and consistent.
- Strong, Dynamic Typing: Variables are dynamically typed, but the language enforces type consistency during operations.
- Performance Optimized: Soplang includes a just-in-time compiler that provides significant performance improvements over traditional interpreted languages.
- Modern Language Features: Includes pattern matching, async/await, and other modern programming paradigms.
- Comprehensive Standard Library: Comes with batteries included - a rich set of modules and functions for common tasks.
- Cross-Platform: Runs on Windows, macOS, Linux, and more.
A Simple Example
# This is a simple Soplang program
def greet(name):
"""Return a greeting message"""
return f"Hello, {name}! Welcome to Soplang."
# Using the function
message = greet("World")
print(message)
# Working with lists
numbers = [1, 2, 3, 4, 5]
squared = [n * n for n in numbers]
print(f"Original: {numbers}")
print(f"Squared: {squared}")
# Simple class definition
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
def describe(self):
return f"{self.name} is {self.age} years old."
# Creating an object
alice = Person("Alice", 30)
print(alice.describe())
Philosophy
Soplang follows these key principles:
- Readability counts: Code is read more often than it's written. Soplang prioritizes clear, readable syntax.
- Explicit is better than implicit: Soplang avoids hidden behaviors and magic methods where possible.
- Simple is better than complex: The language aims to provide straightforward solutions to common problems.
- Performance matters: While maintaining readability, Soplang is designed with performance in mind.
Getting Started
Ready to dive in? Here are some resources to help you get started with Soplang:
Installation
Learn how to install Soplang on your system.
Quick Start
Write your first Soplang program and learn the basics.
Syntax Basics
Understand the fundamental syntax of Soplang.
Tutorials
Follow step-by-step tutorials to build real applications.
Community and Support
Soplang has a growing community of developers. Here's how you can get involved and find help:
- GitHub Repository: Report issues, contribute code, or explore the source.
- Discord Community: Chat with other Soplang developers and get help.
- Stack Overflow: Ask technical questions using the "soplang" tag.
- Community Page: Find more resources and ways to connect.