shortercode/Radiance

Feature: Range literal expression

Opened this issue · 0 comments

Description

Looping a set number of times with a while loop is slightly cumbersome, requiring an additional variable declaration and a increment/decrement expression. A much better alternative would be to use for...of with some form of Iterable value. The addition of a range literal that implements the Iterable interface would fulfil the requirements.

for i of 0...10 {
  print(i)
}