You could have both, in the for loop context make range special and everywhere else have it return a list. Reporting an error when limit is exceeded seems better to me.
If you do have range be a special function in the for context, you can statically determine when limit is excedded instead of checking on every iteration.
|