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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

MoonScript v0.2.2 is released

59 点作者 leafo超过 12 年前

4 条评论

jacktoole1超过 12 年前
It's great to see more development of the language! MoonScript is great if you're looking for the niceness of CoffeeScript in an embedded environment (Lua's semantics also behave more sanely than Javascript's). I have roughly 5000 lines of MoonScript powering my side project [1], and it's been a pleasure to write.<p>Any thoughts of letting the 'do' keyword support coffeescript-style 'do' semantics as well? Invoking a multi-line anonymous function is currently a bit impractical, and allowing do to invoke a single function parameter would make that a lot nicer, and allow for capturing variable's in a closure more easily. Example from the coffeescript docs:<p><pre><code> for filename in list do (filename) -&#62; fs.readFile filename, (err, contents) -&#62; compile filename, contents.toString() </code></pre> [1] <a href="http://www.codingspellbook.com/" rel="nofollow">http://www.codingspellbook.com/</a>
评论 #4742110 未加载
lukegru超过 12 年前
Cool project! Just wondering why you decided to roll your own parser. Is there a lua parser generator library?<p>I've been working on a source translator, sort of like coffeescript for VimL [1], and I can't imagine writing the parser myself instead a BNF grammar (but please correct me if I'm wrong, I only took a cursory look at the src)<p>[1] <a href="https://github.com/luke-gru/riml" rel="nofollow">https://github.com/luke-gru/riml</a>
评论 #4742099 未加载
thirdreplicator超过 12 年前
What's so great about compiling to Lua?
评论 #4742791 未加载
评论 #4742059 未加载
malkia超过 12 年前
Is there an emacs-mode for it?
评论 #4742386 未加载