Gossamer:静态类型编程语言
一门强调可靠性、易用性与性能的静态类型编程语言,支持解释和编译执行。
- 浏览
- 7
- 访问
- 0
- 下载
- 0
- Stars
- 192
- 版本
- v0.85.0
- 平台
- Windows、macOS、Linux
详细介绍
项目简介
Gossamer 是一门正在开发中的编程语言及其工具链,使用 Rust 构建。项目目标是打造一门像 Rust 和 F# 一样可靠、富有表达力的语言,同时提供较大的标准库,并支持解释执行或编译执行。官网提供文档、在线 Playground 和语言导览。
主要功能
- 强静态类型系统,支持代数数据类型、穷尽模式匹配、默认不可变、
Result与Option错误处理、无默认null。 - 自动内存管理,使用确定性引用计数,并提供受检查区域;采用保守的词法借用检查,不需要显式生命周期标注。
- 解释与编译层级保持一致:VM、JIT、AOT 下语义一致被视为发布门槛。
- 支持无色结构化并发、并行集合适配器、管道操作符
|>、REPL 和关键字参数等。 - 内置 MCP server。
- 提供
Queue、Stack、MinHeap、MaxHeap、Deque等独立集合类型。 - 源码文件使用
.gos扩展名,CLI 为gos,项目清单为project.toml。 - 可通过 Rust 扩展语言能力;编辑器集成见
gossamer-lang/gossamer-editor-support。
安装与使用
资料未提供具体安装命令。可访问官网与在线 Playground 试用:
- 官网与文档:https://gossamer-lang.org/
- 在线试用:https://gossamer-lang.org/playground/
- 语言导览:https://gossamer-lang.org/tour/
脚本入口文件可省略 fn main 包装,文件级裸语句会成为隐式 fn main() 的函数体,例如:
println("Hello World")
命令行工具名为 gos,可用 gos feature-status 查看已发布功能与受兼容性保护的稳定功能。
注意事项
项目仍处于密集开发阶段,语言核心元素可能变化或破坏。当前为预稳定版本,除非条目被明确提升为 Stable,否则应视为可能变更。Gossamer 直接编译为原生代码,不转译到 Rust 或 Go;不支持用户自定义宏,元编程采用 Zig 风格的 comptime。
本作品整理自 GitHub 开源项目 gossamer-lang/gossamer,原作者 @gossamer-lang,许可证 Apache-2.0。中文介绍由 AI 根据项目 README 整理,以原仓库为准。
更新记录
- v0.85.0当前版本
## What's Changed * Towards 0.85.0 - Declared orders, scoped mutex guards, checked path joins, and more compile-time refusals by @danpozmanter in https://github.com/gossamer-lang/gossamer/pull/326 * Fixes for 0.85.0 - Declared orders, scoped mutex guards, and more compile-time refusals by @danpozmanter in https://github.com/gossamer-lang/gossamer/pull/327
- v0.84.4
## What's Changed * 0.84.4 - Buffered file reads and writes, and calendar days on a wall-clock time by @danpozmanter in https://github.com/gossamer-lang/gossamer/pull/325
- v0.84.3
## What's Changed * 0.84.3 by @danpozmanter in https://github.com/gossamer-lang/gossamer/pull/324
评论