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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ravi – Lua 5.3 with optional static typing

48 点作者 johlo超过 9 年前

6 条评论

cmrdporcupine超过 9 年前
If a type system can be easily escaped, does it really offer you much?<p>If it&#x27;s still transformed to run in the runtime of a late-bound dynamic typed language where the types can&#x27;t be used by the compiler to produce optimized code with early-bound type function&#x2F;method dispatch, does it really offer you much?<p>I guess I don&#x27;t really see optional static typing as giving the best of both worlds, as it cannot deliver on what a good static type system can give you.
评论 #10405285 未加载
评论 #10405259 未加载
评论 #10405930 未加载
评论 #10405381 未加载
评论 #10406444 未加载
评论 #10406070 未加载
bitmadness超过 9 年前
This is interesting, but the benchmarks suggest that LuaJIT usually does as good, if not better. So there doesn&#x27;t seem to be much benefit to the static types, at least performance-wise.
评论 #10406816 未加载
hellofunk超过 9 年前
I often wonder if the whole idea of &quot;typing&quot; is the wrong decision in language design, if we shouldn&#x27;t come up with something better. Dynamic languages are often trying to insert some form of typing. Static languages are often trying to inject tools for heterogenous collections. It&#x27;s clear there are advantages to both approaches, yet a languages is usually definitely one or the other, which seems limiting. Not that I have a solution, but perhaps breaking programs into primitive types or lack thereof isn&#x27;t the right approach to the abstraction.
评论 #10405684 未加载
评论 #10406128 未加载
评论 #10405570 未加载
评论 #10405950 未加载
评论 #10406746 未加载
评论 #10405363 未加载
评论 #10405871 未加载
PicassoCT超过 9 年前
Lua is a great little language.<p>You gain the most from this, if you stay lua-native for the entire time- doing all calculations in the lua-vm, and are not depending to much on calls into the underlying c-programm (happy cache misses :( ).<p>Is there a optimization, that starting from the calls, creates dependancy trees, which allow to bundle away the calculation and calling of the call into seperate (pre-existing Tasks), in such a way, that the Result for simple-calls is in when the programm reaches the call?
sitkack超过 9 年前
See also <a href="http:&#x2F;&#x2F;terralang.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;terralang.org&#x2F;</a>
allan_s超过 9 年前
Can projects like prosody (an xmpp server) runs on it ? Would it benefits from it ?
评论 #10405322 未加载