.. not an API.
| Factor | API (Application Programming Interface) | DSL (Domain-Specific Language) | LunyScript Position | Score |
|---|---|---|---|---|
| Purpose | Provides functions/methods to interact with external systems | Provides specialized syntax/constructs for a specific domain | Gameplay programming abstractions (Coroutines, StateMachines, BehaviorTrees) | 70% DSL |
| Syntax | Uses host language syntax | Has its own syntax/grammar | âDeclarative, syntax-reduced, block-based C# DSLâ | 90% DSL |
| Abstraction Level | Low-level, imperative calls | High-level, domain-focused expressions | âHigh-level processingâ with 3-5x less code than GDScript | 85% DSL |
| Learning Curve | Learn function signatures | Learn domain concepts + syntax | âAccessible programming seated between visual and native codeâ | 60% DSL |
| Extensibility | Call additional functions | Extend grammar/add constructs | âEasy to extend. Expected to be extended.â | 50/50 |
| Integration | Library/SDK that calls engine code | Language that compiles/translates to engine code | Block-based C# that executes cross-engine | 75% DSL |
| Flexibility | Limited to provided functions | Domain-constrained but expressive within scope | Scoped to gameplay (Input/Motion/Physics/Audio, NOT shaders/networking) | 80% DSL |
LunyScript: 73% DSL / 27% API - very accurate measurement! :)
Reasoning: LunyScript is primarily a DSL because it:
However, it retains API characteristics through: