Support traditional for() loop syntax

I’m not sure. If it’s not already supported by filter or map, I suppose you could have an iterator that accepts a function argument, I don’t know, almost considering what you would do with iterators if you thought of them like a tween

Not sure what it would mean to think of iterators like tweens… Maybe I just haven’t thought about tweens enough? :confused:

With tweens, you’re moving from one value to another, and have lots of “inbetween” values, so a linear tween is 0 to 1, like 0.1, 0.2, 0.3, etc, but an elastic tween, or an exponential tween, will still start and end at the same values, but end up at totally different places. Just thinking creatively about whether any of the types of features you would have in something like Actuate would make any sense in the context of iterators instead

That really doesn’t strike me as a common use case. If I needed to do something like that, I’d use a normal iterator and then use another function to convert the iterator’s output.

Just trying to be creative :wink:

I think iterating over a custom function to return iterators could handle any kind of bizarre/special use case

What is the reason that there is no support for traditional “for” loop in Haxe?
I like alternative, but I do not understand why there can not be both options, since many programmers are used to use traditional one in their various languages already, and also migrating codes from AS3 that Haxe is supposed to be based on, is unnecessary more complicated.

This topic has pretty much been discussed to death, for instance there’s a long thread about it here, and you should easily be able to find more. I’d say it’s quite unlikely that anything will change with regards to this.

Also, Haxe is not “supposed to be based on AS3”. The two share quite a few similarities syntax-wise, but I don’t think being close to AS3 was ever a design goal. Haxe also takes inspiration from languages such as OCaml, which is quite unlike AS3.