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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Why is WebAssembly friendlier with system languages?

2 点作者 krptos超过 3 年前
It&#x27;s a naive question but points me directly to a large hole in my understanding of WebAssembly. Here are the hints I already gathered but didn&#x27;t give me quite a complete picture yet:<p>1. It makes sense that any language with GC-less memory management will be easier to port to WASM, because in WASM all we have is a linear array of bytes as memory.<p>2. But then higher languages like Kotlin have a LLVM backend, and then derive WASM binaries from LLVM IR. What makes this possible?<p>3. Even dynamically typed languages like Python are ported to WASM (I guess they ship the interpreter itself with the binary which will make them heavier) but I&#x27;m not sure how is it different from #2 or am I confusing two different routes?<p>4. What does this even mean - https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;gc&#x2F;#gc-proposal-for-webassembly ? &quot;GC proposal for webassembly&quot; - how will it aid in WASM becoming friendlier with higher level languages?<p>5. What exactly is ahead of time compilation? What relation does it have with WASM?<p>All this means I have a very shallow understanding of memory management. So feel free to get as technical as possible. Thank you!

1 comment

jitendrac超过 3 年前
Wasm is actually a platform independent bytecode that can be run at near native speed by your modern browser.<p>Think it like a java bytecode, but which runs inside a browser.