TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Flirting with Crystal, a Rubyist Perspective

3 点作者 willlll将近 9 年前

1 comment

MrBra将近 9 年前
Quick summary:<p>Although Crystal is single threaded, it implements the reactor pattern (like Node.js), so it can be useful to build highly concurrent applications with the advantage that appears to be faster that Node.js (small benchmarks) and has a nicer syntax than JS, Go or Rust.<p>Crystal&#x27;s aim is not being a faster fully compatible Ruby runtime, it just wants to leverage Ruby&#x27;s nice syntax and standard lib in its own world. It does not support any idea of reflection and consequently meta-programming, but with Macros (and more effort), you could go somewhat close to it.<p>Also, if you are not interested in replacing Ruby with Crystal completely, you could just use it for some CPU intensive code, writing almost the same Ruby code but as a compiled native extension.<p>Crystal does not support Windows yet.