assemblyscript
assemblyscript copied to clipboard
Support generators
This sort of feature would help us develop features like Array.prototype.entries, Array.prototype.values, and other features that require generators.
For instance:
class Array<T> {
*values(): Iterator<T> {
var length = this.length_;
for (let i = 0; i < length; i++) {
yield this.__unchecked_get(i);
}
}
}
I will collect and share helpful articles about generators here:
- https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/advanced-constructs/generators.html
Years passed, Is there any plan/news for this?