Norma — the standard library
Norma 是 Faber 的標準函式庫。它提供以拉丁文命名的扁平模組,透過 norma:* 路徑存取。標準函式庫宣告是鄰近 norma 儲存庫中的 Faber 原始碼。
模組#
| 模組 | 領域 |
|---|---|
norma:solum | 檔案系統操作 |
norma:solum/path | 純路徑名稱操作 |
norma:http | HTTP 用戶端 |
norma:processus | 程序執行 |
norma:consolum | 主控台 I/O(標準輸入、標準輸出、標準錯誤) |
norma:json | JSON 解析與序列化 |
norma:toml | TOML 解析 |
norma:yaml | YAML 解析 |
norma:valor | 編解碼器導覽 |
norma:tensor | 張量橋接輔助工具 |
norma:tempus | 時間與持續時間 |
norma:aleator | 隨機性 |
Morphologia 命名慣例#
Norma 遵循 morphologia 政策來命名所有方法。拉丁文動詞變化形式表示執行模式:
| 詞幹 | 同步 | 非同步 | 意義 |
|---|---|---|---|
leg- | lege | leget | 讀取 |
scrib- | 寫出 | scribet | 寫入 |
quaer- | — | quaeret | 查詢(有限) |
quaer- | — | quaerent | 查詢(串流) |
所有權配對(變更與複製輸出):
| 變更 | 複製輸出 | 意義 |
|---|---|---|
adde | addita | 新增 |
inverte | inversa | 反轉 |
filtra | filtrata | 篩選 |
使用方式#
importa ex "norma:solum" privata solum
functio legeConfig() → textus {
redde solum.lege("config.toml")
}