gkz / LiveScript

LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.
http://livescript.net
MIT License
2.31k stars 156 forks source link

test 2 #1087

Closed determin1st closed 4 years ago

determin1st commented 4 years ago

I think, it fixes:

https://github.com/gkz/LiveScript/issues/349

Because the compiler optimization, as well as the for loop, could give different result than while using .slice, my idea is to use .slice only in 2 easy to remember cases:

  • variable[a til b]
  • variable[a to b]

where a and b could be a literal, an expression or be empty. That way it could still use .slice, while not being a cognitive burden.