Mohsen Azimi schrieb:

I'm proposing to allow  `get corners* () { ...` (a generator getter
method) so the for..of loop can be written like this:

```
for (let corner of rectangle.corners) {
   console.log(corner);
}
```

I would avoid that. `rectangle.corners !== rectangle.corners` could be quite confusing. Creating the generator explicitly is a better idea. And as kevin said, you still can return generators from your getters manually if you really want that.

Regards,
 Bergi
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to