Re:MoonScript, a programmer friendly language that compiles ...
by shalabhc on Tuesday May 30, 2017 @06:51AM
(#14444320)
>
function f(a, b, c, d)
a = a or 1
b = b or 2
c = c or 3
d = d or 4
end
Compare with: f = (a=1, b=2, c=3, d=4) -> ...
Also note the latter is correct when you call it as f(false).
https://news.ycombinator.com/item?id=14444215
> local is default, not global
I think this is a con.
> a simple class system if you need it
I also think this is a con, because it limits flexibility.
Here's my class system:
And how to use it: If I want to add multiple inheritance, or interfaces, it is easy. Because it is just metatables. With MoonScript this is not possible.> `export`, `from` and `import` keywords
Sounds like a con to me. `require` is simple.
> `+=`, `/=`, `*=`
I agree with this one.