https://github.com/cloth-foundation/cloth
A statically-typed OOP language with two-pass compilation.
https://github.com/cloth-foundation/cloth
compiler golang help-wanted programming-language static-typing
Last synced: 3 months ago
JSON representation
A statically-typed OOP language with two-pass compilation.
- Host: GitHub
- URL: https://github.com/cloth-foundation/cloth
- Owner: Cloth-Foundation
- License: other
- Created: 2025-08-04T09:11:55.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-09-27T20:12:26.000Z (4 months ago)
- Last Synced: 2025-09-27T22:11:31.517Z (4 months ago)
- Topics: compiler, golang, help-wanted, programming-language, static-typing
- Language: Go
- Homepage: https://cloth.dev
- Size: 1.6 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Governance: GOVERNANCE.md
Awesome Lists containing this project
README

**Cloth** is a statically typed, object-oriented, general-purpose programming language.
It is currently interpreted, but designed with future compilation in mind.
Cloth focuses on **clarity, accessibility, and expressiveness**—its syntax is clean and minimal, making it approachable for beginners, while still powerful enough to support advanced software engineering practices.
---
## Features
* **Statically Typed** – Strong, explicit types to catch errors early.
* **Object-Oriented** – Classes, inheritance, and encapsulation built in.
* **General-Purpose** – Suitable for applications ranging from scripting to larger systems.
* **Beginner Friendly** – Accessible syntax designed to be intuitive for newcomers.
* **Expressive** – Rich enough to model complex systems without unnecessary verbosity.
* **Interpreted (for now)** – Rapid development and testing cycle with plans for future compilation.
---
## Philosophy
Cloth’s design is guided by three core principles:
1. **Clarity First** – The syntax should read naturally, without clutter or boilerplate.
2. **Accessibility** – New developers can learn Cloth quickly without sacrificing rigor.
3. **Scalability** – A language that grows with the developer, from toy programs to large projects.
---
## Example
```cloth
class Person {
var name: string
var age: i32
func greet(): string {
ret "Hello, my name is " + self.name
}
}
func main() {
let alice = new Person("Alice", 30)
print(alice.greet())
}
```
---
## Status
* Current stage: **Early Development**
* Execution model: **Interpreter**
* Roadmap: Future plans include a bytecode virtual machine and ahead-of-time compilation.
---
## Goals
* Provide a **modern, clean alternative** to traditional OOP languages.
* Support both **rapid prototyping** and **long-term software projects**.
* Build a strong **standard library** around everyday development needs.
* Encourage a **community-driven ecosystem**.
---
## Documentation
Documentation is a work in progress. Current docs can be found on the [official website](https://cloth.dev).
---
## Contributing
Contributions are welcome! Please check the `CONTRIBUTING.md` file for guidelines.
---
## License
Cloth is open-source and licensed under the **MIT License**.