TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ravi – Lua 5.3 with optional static typing

48 pointsby johloover 9 years ago

6 comments

cmrdporcupineover 9 years ago
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 未加载
bitmadnessover 9 years ago
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 未加载
hellofunkover 9 years ago
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 未加载
PicassoCTover 9 years ago
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?
sitkackover 9 years ago
See also <a href="http:&#x2F;&#x2F;terralang.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;terralang.org&#x2F;</a>
allan_sover 9 years ago
Can projects like prosody (an xmpp server) runs on it ? Would it benefits from it ?
评论 #10405322 未加载