Looks interesting, but the use of "\" instead of "." is really a turnoff. Why do languages (I'm looking at you, PHP) think that using the backslash in any other way than escaping is a good idea?
I really don't see why \ has anything do with escaping when not in the context of a string (or regex) literal. There is no ambiguity whatsoever. It's a shame more languages don't use it because it's easy to type (no shift required).
Show HN: Lapis – A web framework for MoonScript and OpenResty
21–26 of 26 posts
Re: Show HN: Lapis – A web framework for MoonScript and OpenResty
#22Re: Show HN: Lapis – A web framework for MoonScript and OpenResty
#23Earlier quoted context omitted.
I really don't see why \ has anything do with escaping when not in the context of a string (or regex) literal. There is no ambiguity whatsoever. It's a shame more languages don't use it because it's easy to type (no shift required).
It's not easy to type on some keyboard layouts such as the finnish one though (alt gr and - of american layout) http://frontype.com/keyboarding/540px-Computer-keyboard-Swed...
Re: Show HN: Lapis – A web framework for MoonScript and OpenResty
#24Earlier quoted context omitted.
Couldn't agree more. I've am looking at Lua for a new project and got excited when I saw this. However, that syntax looks terrible. What's worse, is it is inconsistent. Take: csrf.assert_token @ Users\create name: @params.username I don't get why they both can't be '.', which would be very readable and approachable to everyone. All that said, this looks great given it is built on OpenResty (whose performance seems ou…
I've used moonscript a lot, and don't particularly like the \ syntax. However, you get used to it quickly, and it stops seeming like such a big deal. It would be hard to have both be '.', because of lua semantics: '.' means "get the property from the table", while ':' in lua and '\' in moonscript mean "get the function from this table, with the first parameter for that function bound to the table itself". Javascript/…
Re: Show HN: Lapis – A web framework for MoonScript and OpenResty
#25Earlier quoted context omitted.
I've used moonscript a lot, and don't particularly like the \ syntax. However, you get used to it quickly, and it stops seeming like such a big deal. It would be hard to have both be '.', because of lua semantics: '.' means "get the property from the table", while ':' in lua and '\' in moonscript mean "get the function from this table, with the first parameter for that function bound to the table itself". Javascript/…
Would you recommend learning Lua first before going into moonscript ?
Re: Show HN: Lapis – A web framework for MoonScript and OpenResty
#26Earlier quoted context omitted.
I've used moonscript a lot, and don't particularly like the \ syntax. However, you get used to it quickly, and it stops seeming like such a big deal. It would be hard to have both be '.', because of lua semantics: '.' means "get the property from the table", while ':' in lua and '\' in moonscript mean "get the function from this table, with the first parameter for that function bound to the table itself". Javascript/…
Would you recommend learning Lua first before going into moonscript ?
I don't think it's possible to learn moonscript without learning lua concurrently, since lua makes up so much of the underlying semantics. So I think the choice is either (a) learn lua, or (b) learn lua and moonscript for some nice syntactic sugar.