2 ms·
> I’m not sure being forced to do ‘vanilla’ is ‘boilerplate nonsense’. It’s debatable. I'm of a very strong opinion that a range-plus-forEach style is going to
by crooked-v 9y ago
> I’m not sure being forced to do ‘vanilla’ is ‘boilerplate nonsense’. It’s debatable.
I'm of a very strong opinion that a range-plus-forEach style is going to be tremendously more readable at a glance than any for loop, especially since it makes the inevitable confusion of zero-indexing a non-problem for beginners.
> It is actually to illustrate both are ok to use.
Using both is only helpful for teaching purposes if you also teach why there are two different syntaxes and what the differences are between them. They aren't interchangeable, and treating them like they are just means trouble later.