mirror of
https://github.com/leafo/moonscript.git
synced 2024-12-08 01:54:24 +00:00
update thoughts
This commit is contained in:
parent
ca4427cf6d
commit
dd1a06ff1a
32
thoughts
32
thoughts
@ -3,16 +3,10 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
-- local * and local ^
|
|
||||||
|
|
||||||
-- seems like running in moon messes up require order
|
|
||||||
|
|
||||||
- don't reuse _, put a local on it, so we don't keep around trash
|
- don't reuse _, put a local on it, so we don't keep around trash
|
||||||
|
|
||||||
-- swithc X with Func
|
-- swithc X with Func
|
||||||
|
|
||||||
- or= and=
|
|
||||||
|
|
||||||
- error with stray comma at end of line
|
- error with stray comma at end of line
|
||||||
|
|
||||||
* multiline comments
|
* multiline comments
|
||||||
@ -20,22 +14,18 @@
|
|||||||
|
|
||||||
* combine for and if line decorators
|
* combine for and if line decorators
|
||||||
|
|
||||||
* export later? nah
|
|
||||||
|
|
||||||
x = 232
|
|
||||||
export x
|
|
||||||
|
|
||||||
|
|
||||||
* allow return anywhere in block
|
* allow return anywhere in block
|
||||||
|
|
||||||
* any/every keywords for comprehensions? (what about iterators)
|
|
||||||
|
|
||||||
* let array items in table be defined without {} when indented (no, too similar to arguments)
|
|
||||||
|
|
||||||
-- for searching? for returning to accumulator early?
|
|
||||||
x = for thing in *things
|
|
||||||
if is_important thing
|
|
||||||
break thing
|
|
||||||
|
|
||||||
-- all function literals have a string that is their function definition
|
-- all function literals have a string that is their function definition
|
||||||
|
|
||||||
|
-- super should work here:
|
||||||
|
|
||||||
|
thing = Thing!
|
||||||
|
thing.method = ->
|
||||||
|
super 1,2,3
|
||||||
|
|
||||||
|
-- goes to
|
||||||
|
|
||||||
|
thing.method = function(self) do
|
||||||
|
self.__class:method(1,2,3)
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user