Skip to content

Origami-lang is an innovative hybrid scripting language that deeply integrates PHP's rapid development capabilities with Go's efficient concurrency model. It also incorporates some Java and TypeScript conventions.折言(origami-lang) 是一门创新性的融合型脚本语言,深度结合 PHP 的快速开发基因与 Go 的高效并发模型。它以「折叠」为设计哲学——将两种语言的精华折叠进同一语法体系,让开发者以更优雅的方式编写高性能脚本。

Notifications You must be signed in to change notification settings

php-any/origami

Repository files navigation

Origami-lang

Origami-lang is an innovative hybrid scripting language that deeply integrates PHP's rapid development capabilities with Go's efficient concurrency model. It also incorporates some Java and TypeScript conventions.

中文文档 | English Documentation

⚠️ Current Status

The codebase has not been optimized yet, and performance is not optimized. Please use it as a tool, do not use it in production environments.

🚀 Core Features

🎯 Go Reflection Integration

  • Easy Registration: Register Go functions and structs to the script domain with zero configuration
  • Automatic Type Conversion: Seamless integration between Go and script types
  • Named Parameters: Support for constructor named parameters

🎨 Syntax Fusion

  • PHP Compatibility: Supports most PHP syntax patterns
  • Go Concurrency: spawn keyword for coroutines
  • Type System: Type declarations and nullable types
  • Generic Classes: Support for generic syntax class DB<T>

💡 Special Features

  • HTML Embedding: Direct HTML code blocks
  • Duck Typing: like keyword for structural matching
  • Chinese Keywords: Support for Chinese programming keywords
  • Functional Programming: Rich array methods (map, filter, reduce, etc.)

🚀 Quick Start

git clone https://github.com/php-any/origami.git
cd origami
go build -o origami .
./origami script.zy

📚 Documentation

For detailed documentation, please visit the Documentation Center:

📝 Examples

See the examples directory for complete examples, or visit the test cases for more usage patterns.

💬 Discussion Group

Origami Discussion Group QR Code

📄 License

MIT License

About

Origami-lang is an innovative hybrid scripting language that deeply integrates PHP's rapid development capabilities with Go's efficient concurrency model. It also incorporates some Java and TypeScript conventions.折言(origami-lang) 是一门创新性的融合型脚本语言,深度结合 PHP 的快速开发基因与 Go 的高效并发模型。它以「折叠」为设计哲学——将两种语言的精华折叠进同一语法体系,让开发者以更优雅的方式编写高性能脚本。

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages