Emela は Native と WebAssembly へのコンパイルを想定した、実験的な関数型言語です。
このリポジトリでは、言語仕様を小さな単位で段階的に定めます。各トピックはまず 小さな仕様ドラフトとして作成し、未解決の設計論点が解消されたものだけを安定化 します。
- コア言語は、ゼロから実装できる程度に小さく保つ。
- 実行時の挙動は明示的に定義し、Native/WASM 間で移植可能にする。
- 言語境界では、型付きの関数型セマンティクスと明示的な effect tracking を優先する。
- 実装戦略より先に、観測可能な挙動を仕様化する。
- 最初のバージョンで大きな標準ライブラリを持つこと。
- コアセマンティクスが安定する前に高度な最適化規則を定めること。
- ターゲットごとにプログラムの意味が変わる挙動を許すこと。
各仕様ファイルは次の構造を使います。
# NNNN: Title
Status: Draft | Accepted | Superseded
## Summary
機能または規則の短い説明。
## Motivation
なぜ今この仕様が必要か。
## Specification
規範的な規則。必要に応じて MUST, MUST NOT, SHOULD, MAY を使う。
## Examples
小さなソース例と期待される意味。
## Compilation Notes
Native/WASM への lowering 制約、ABI、表現、実装上の注意。
明示しない限り、この節は非規範的な補足とする。
## Open Questions
Accepted にする前に解くべき未解決事項。仕様ファイルは specs/ に置き、ゼロ埋めの番号プレフィックスを付けます。
Accepted になった仕様は非互換に書き換えず、古い仕様を supersede する新しい仕様を
作成します。
- 0000: Language Design Principles
- 0001: Core Values and Types
- 0002: Bindings and Mutation
- 0003: Function Definitions and Calls
- 0004: Blocks and Expression Semantics
- 0005: Enum and match expression
- 0006: Records
- 0007: Arrays and Strings
- 0008: Function Types with Effects
- 0009: Effect Semantics
- 0010: Modules, Imports, and Visibility
- 0011: Error handling
- 0012: Typed IR
- 0013: Platform Functions and Runtime Provision
- 0014: Generic Functions
- 0015: If Expression
- 0016: Integer Division and Remainder
- 0017: Char and String Concatenation
- 0018: Qualified Imports and Calls
- 0019: Pipeline Operator
- 0020: Traits
- 0021: Intrinsic Functions
- 0022: Effect-Row Polymorphism
- 0023: Effect Inference and Subsumption
- 0024: Memory Model
- 0025: Capability Manifest
- 0026: Embedder-Defined Capabilities
- 0027: Boolean and Comparison Operators
- 0028: Generic Data Type Declarations
- 0029: Stdlib List
- 0030: Stdlib String Operations
- 0031: Stdlib Option Combinators
- 0032: Packaging and Dependency Resolution
- 0033: Language Server
- 0034: Multiline Expressions and Trailing Commas
- 0035: Canonical Formatting and Lint
- 0036: Effect Declarations and Effect-Qualified Operations
- 0037: Module-Unit Imports and First-Class Effects
- 0038: Core Package Embedding and the core/std Boundary
- 0039: Attributes
- 0040: Unit Testing — @test and emela test
- 0041: Lang Items — the @lang Attribute
- 0042: Option as a Core-Prelude Enum
- 0043: Fallible Platform Functions — extern fn と throws
- 0044: HTTP Client — effect Http と std.http
- 0045: Self Tail Calls — 自己末尾呼び出しの保証
- 0046: HTTP Server — effect HttpServer と main ループ
- 0047: Monoid — combine と empty(戻り値位置 Self の解禁)
- 0048: ARC — WASM バックエンドの決定的参照カウント実行