MoonScript, a programmer friendly language that compiles to Lua
1–10 of 171 posts
Re: MoonScript, a programmer friendly language that compiles to Lua
#2Re: MoonScript, a programmer friendly language that compiles to Lua
#3Re: MoonScript, a programmer friendly language that compiles to Lua
#4I love the syntax that Coffeescript-like languages are converging to, like Moonscript, tj's luna ( https://github.com/tj/luna ) and Pogoscript ( http://pogoscript.org/ ). They fall way on the right of the "computer code vs. human code" spectrum, which is handy when writing applications as quickly as possible rather than focusing on fine details like implementation and performance. It's a shame I don't see it often in…
Re: MoonScript, a programmer friendly language that compiles to Lua
#5I find Lua itself very programmer friendly.
Re: MoonScript, a programmer friendly language that compiles to Lua
#6I find Lua itself very programmer friendly.
Agreed, but it looks like it adds a layer of syntax to give you things like classes without the user having to leverage metatables.
EDIT: I am not saying this is better - it could certainly be improved or, as is the case with a project of mine, injected into the runtime as a global value. It's just good for running MoonScript alongside Lua.
Re: MoonScript, a programmer friendly language that compiles to Lua
#71. Lists and objects/dicts only; objects have no prototypes at all; objects have no first-class methods, but they can have functions as member variables, and those functions can close over other data in the object
2. All function and variable declaration is anonymous (as a consequence of 1); if you want to define a schema for an object, build a function that takes certain arguments and returns an object with the corresponding structure.
3. Coroutines/fibers/etc for async things; no promise/callback hell
4. Type annotations a la Python (not sure how this fits with 2 just yet)
EDIT: I did a bad job of emphasizing this, but syntax is important to me--I want something that looks like:
var foo = {
x: [1, 2, 3],
y: (a, b, c) => {
var sum = a + b + c;
sum * sum
},
}
Whether or not you agree that syntax should be a relevant criteria is a different matter. :)Re: MoonScript, a programmer friendly language that compiles to Lua
#8I understand that people love programming in classes, but I really want something like a stripped-down ES6. In particular, I want: 1. Lists and objects/dicts only; objects have no prototypes at all; objects have no first-class methods, but they can have functions as member variables, and those functions can close over other data in the object 2. All function and variable declaration is anonymous (as a consequence of…
Re: MoonScript, a programmer friendly language that compiles to Lua
#9After spending years working with Ruby or Java, it was a very nice change of pace. Lapis (leaf's web framework) is crazy good as well: it's easy to write fast code, see this article on coroutines: http://leafo.net/posts/itchio-and-coroutines.html
(disclaimer: I work there with Leaf!)
Re: MoonScript, a programmer friendly language that compiles to Lua
#10I understand that people love programming in classes, but I really want something like a stripped-down ES6. In particular, I want: 1. Lists and objects/dicts only; objects have no prototypes at all; objects have no first-class methods, but they can have functions as member variables, and those functions can close over other data in the object 2. All function and variable declaration is anonymous (as a consequence of…