Rhombus 1.1 现已发布

Hacker News Top 工具

摘要

Rhombus 版本 1.1 现已发布,引入了新的语法特性,如注解和绑定,并伴随模块改进,以提升这门通用编程语言的可用性和可定制性。

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/08/17 03:47

# Rhombus v1.1 来源:https://blog.racket-lang.org/2026/08/rhombus-v1.1.html Rhombus 1.1 版本现已发布! 我们很高兴地宣布,Rhombus 1.1 现已可从 https://rhombus-lang.org/ 获取。 *Rhombus(https://rhombus-lang.org/)是一种通用编程语言,易于使用且具有独特的可定制性。* ## 本次版本更新内容: - 新增 `annot`(https://docs.racket-lang.org/rhombus-reference/Annotations.html?fam=Rhombus&famroot=rhombus#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core%29._annot._rhombus%2Fdefn%29%29)和 `annot.def`(https://docs.racket-lang.org/rhombus-meta/Annotation_Macros.html?fam=Rhombus&famroot=rhombus#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core-meta%29._annot._%28annot..def._rhombus%2Fdefn%29%29%29),作为无需直接编写元时(即宏)代码即可定义注解的方式。 - 新增 `as`(https://docs.racket-lang.org/rhombus-reference/Definitions.html?fam=Rhombus&famroot=rhombus#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core%29._as._rhombus%2Fbind%29%29)作为绑定形式,有时比使用 `&&` 具有更好的可读性,并提供了遮蔽作为绑定形式绑定的标识符的方式。 - 更改 `class`(https://docs.racket-lang.org/rhombus-reference/class.html?fam=Rhombus&famroot=rhombus),使其使用对应的超类或接口引用来绑定继承的名称。 - 更改 `space.enforest`(https://docs.racket-lang.org/rhombus-meta/ref-space.html?fam=Rhombus&famroot=rhombus#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core-meta%29._space._%28space..enforest._rhombus%2Fdecl%29%29%29),使其在应用标识符处理器时采用与宏转换器相同的方式调整作用域。 - FFI:为 `new`(https://docs.racket-lang.org/rhombus-ffi/pointer.html?fam=Rhombus&famroot=rhombus#%28def._%28%28lib._ffi%2Fmain..rhm%29._new%29%29)添加初始化数组变体。 - Pict(https://docs.racket-lang.org/rhombus-pict/index.html?fam=Rhombus&famroot=rhombus):更改 `explain_anim` 以添加 `~label_as` 参数。更改 `Pict.rebuilt` 以进行重建替换,并添加 `~as_rebuilt` 参数以选择旧或新的行为。`Pict.rebuild` 方法也支持 `~as_rebuilt`。改进 `magic_move` 和 `cross_fade` 以更好地处理段落点和子 pict 的多个实例。 - Slideshow(https://docs.racket-lang.org/rhombus-slideshow/index.html?fam=Rhombus&famroot=rhombus):添加 `slide_transition` 和 `continued` 页码。 感谢为本版本做出贡献的社区成员。 ## 欢迎反馈 问题和讨论欢迎在 Racket 社区的 Discourse(https://racket.discourse.group/invites/VxkBcXY7yL)或 Discord(https://discord.gg/6Zq8sH5)(`#rhombus` 频道)进行。 任何人都可以参与 Rhombus 设计讨论。Racket 团队的非官方格言是 *我们能做的,你也能做:* 程序员应感到有权力参与他们所使用的语言的创建。讨论、拉取请求和议题对所有人开放,广泛的观点尤其有益。

相似文章

使用Rhombus进行灵活的元编程

Hacker News Top

Rhombus是一种新的编程语言,它将Racket强大的元编程能力与类似Python的语法相结合,已发布1.0版本,并由Racket编程语言基金会支持。

Racket v9.3

Hacker News Top

Racket v9.3 已发布,包含多项新功能,包括 Markdown 文档生成、改进的教学语言,以及增强的包管理和 FFI 支持。

rhun

Product Hunt

rhun 是一款用汇编语言编写的小型、快速的代码编辑器,支持 Windows、Linux 和 macOS,内置终端、Git diff、模糊搜索、Vim 模式,以及用于 Claude Code 和 Codex 会话的面板。它作为一款免费开源工具在 Product Hunt 上发布。