这几个理念还是挺吸引人的。
No hidden control flow
No hidden allocations
First-class support for no standard library
A Portable Language for Libraries
A Package Manager and Build System for Existing Projects
Simplicity
Tooling
这几个理念还是挺吸引人的。
No hidden control flow
No hidden allocations
First-class support for no standard library
A Portable Language for Libraries
A Package Manager and Build System for Existing Projects
Simplicity
Tooling
感觉和 rust 差不多
从目标角度来说,差别还是挺大的,rust的目标是安全性,zig的目标是可读性。
bun现在是zig的killer app
前端世界真是轮子王国呀 (不是讽刺, 是赞美)
建议楼主读这个讨论 https://www.reddit.com/r/rust/comments/rlj9zl/what_do_you_think_about_zig/
我才发现国外的偏执于讨论的人一点不比知乎少啊
不吹不黑,reddit 这类话题水平都不太高的样子
是呀, 我看完了, 除了证明自己对以外, 没有啥营养。
https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html
Zig 现在做这个工具链还挺不错的. Rust 也有人用
这种玩意吧,Go/Plan9 一开始就有了,就是做 Plan9 的那些人连 POSIX C 都不想支持,更別说 C++ 了。
Plan 9 别说 POSIX 了,自己的 “C” 编译器一点也不标准:
#if 0
struct k
{
int a, b;
};
typedef struct k type;
type
function (a, b)
int a;
int b;
{
type foo;
foo.a = a;
foo.b = b;
return foo;
}
#endif /* 0 */
以上的合格 C 代码,塞满了 Plan 9 C 不支持的功能。。。
那不就是没人做。这个zig还是clang套皮呢,能简化部署流程就是他的价值啊,你没看见多少人为了编译到低版本 glibc 的老系统上都抓耳挠腮的
刚刚试了一下bun, 从安装到第一个框架跑起来,真个过程还是很顺溜的。
可以关注一下bun的创始人的推,他每天关注的都是要把当前node/npm生态下的某个任务,提速10x以上