News for hackers. Stuff that matters.
Re:MoonScript - A programmer friendly language that compiles... by wildmXranat on Thursday August 11, 2011 @08:24AM (#2872482)
If this compiles into Lua/JIT bytecode then there might be a use for it, if this transforms into Lua code then what is the point? Lua is a great and simple language, so this would seem useless
Re:MoonScript - A programmer friendly language that compiles... by wisty on Thursday August 11, 2011 @08:53AM (#2872559)
Not everyone thinks that Lua is great. It's certainly a nice language, and it's popular in some niches, but some people like implicit variable declarations, classes (at times), and comprehensions.

Also, I can see it compiling into JavaScript as well. I'm not sure if that would be a good idea, or a really horrible one, though.

Re:MoonScript - A programmer friendly language that compiles... by jacques_chester on Thursday August 11, 2011 @09:47AM (#2872775)
It's not an acronym, it's an ordinary noun: Lua.

My main grudge against Lua purely as a language is that it has implicit global variables. I can live with the rest of the idiosyncracies.

My main grudge in day-to-day programming is the ecosystem, it's very small. It's a chicken-and-egg thing.

Re:MoonScript - A programmer friendly language that compiles... by hxa7241 on Thursday August 11, 2011 @09:56AM (#2872819)
'Lua bytecode' does not really exist -- i.e. it has no public definition -- the developers can change it in any way at any time -- only the Lua language itself is 'defined'.
Re:MoonScript - A programmer friendly language that compiles... by silentbicycle on Thursday August 11, 2011 @09:50AM (#2872790)
Lua's compiler adds very little overhead, compared to loading directly from luac's precompiled bytecode. It has a really fast, single pass compiler, which is optimized for reading in data serialized as Lua tables. Lua was designed with JSON-like use cases in mind.

Its compiler doesn't do much analysis / optimization, but the performance of individual Lua constructs is usually easy to reason about.

Re:MoonScript - A programmer friendly language that compiles... by strmpnk on Thursday August 11, 2011 @10:01AM (#2872847)
What's the point of locking yourself to a bytecode when Lua code JITs just fine on LuaJIT? Lua is a great language and this looks like another alternative. I doubt we're looking at exclusion here.