rzimmerman / kal

A powerful, easy-to-use, and easy-to-read programming language for the future.
http://rzimmerman.github.io/kal
MIT License
394 stars 18 forks source link

Index in for loop? #118

Closed dijs closed 11 years ago

dijs commented 11 years ago

Could we have the option to use the index in a for...in loop

For example:

for item at index in list
   log "#{item} @ #{index}"

I thought this syntax would be very readable, though, I do not know how easy it is to parse...

rzimmerman commented 11 years ago

I really like this idea (and the at syntax). It sounds like it would be pretty useful.