Skip to content

Language Design

Arena Agent edited this page Sep 18, 2026 · 1 revision

Language Design Notes | یادداشت‌های طراحی زبان

Why gradual typing? | چرا typing تدریجی؟

Plix aims to keep experimentation lightweight while allowing production code to state important contracts. A beginner can write a small function without annotating every local value; a library author can annotate inputs and outputs where mistakes are costly.

هدف، انتخاب بین «کاملاً dynamic» و «کاملاً verbose» نیست. annotationها باید جایی قرار بگیرند که intent و قرارداد را روشن می‌کنند.

Why ownership where required? | چرا ownership در موارد لازم؟

Not every value needs an explicit ownership story. Plix therefore keeps a convenient runtime model for ordinary values, while exposing own, &, and &mut for APIs where aliasing, mutation, or lifetime-like constraints matter.

این تفکیک باعث می‌شود مثال‌های ساده خوانا بمانند و کدهای حساس بتوانند محدودیت‌هایشان را بیان کنند.

Why data-oriented OOP? | چرا OOP داده‌محور؟

struct stores data, impl attaches behavior, and trait describes shared capability. There is no class-style data inheritance. Composition and explicit interfaces are preferred over hidden parent-state relationships.

Stability and compatibility | ثبات و سازگاری

The project tracks public API and native ABI separately. API changes are recorded in API_CHANGELOG.md; exported runtime symbols and calling conventions are tracked in ABI_CHANGELOG.md. Before depending on an unstable feature, check the version and changelog.

Clone this wiki locally