| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=43596419
这篇 Hacker News 讨论帖讨论了 ClickHouse 将 Rust 集成到其 C++ 代码库中的经验。原文强调了 Rust 的优缺点,包括一些最终被证明更实用而重写回 C++ 的案例。评论者们就 Rust 的优缺点展开了辩论,一些人认为 Rust 被过度宣传为“安全问题的灵丹妙药”,指出了其生态系统的不成熟、集成挑战和复杂性。另一些人则为 Rust 在“安全” Rust 中的内存安全保证进行了辩护,并将其与 C/C++ 的内存安全漏洞问题进行了对比。一位用户指出了 Rust 的潜在缺点,例如供应链安全问题以及在没有看到明显优势的情况下被迫采用它的压力。讨论还涉及到 C++/Rust 互操作的挑战、“Rust 福音”现象,以及选择 Go 而不是 Rust 用于 TypeScript 的情况,突出了语言选择的复杂性和细微之处。最后,该讨论帖还提到了使用 Nix 来进行 Rust/C++ 混合项目的可重复构建的潜力。
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
While C++ isn't perfect, has the warts of a 50 year's old language, and probably will never match Rust's safety, we would already be in a much better place if at least everyone used the tools at their disposal from the last 30 years.
While I would advise to use Rust for some security critical scenarios, there are many others where it is still getting there, and there are other requirements to take into account other than affine types.
reply