loading...

re: Notes on ECMAScript 6 (ES6) VIEW POST

TOP OF THREAD FULL DISCUSSION
re: What are your thoughts on iterator as a protocol and not an interface?
 

it is pretty useful, I think it has become better to work with collections, if you have teamates with python background, they can easily recognize [...someIterable] also it lets you do some stuff like const keys = [...Object.keys(myObj)] without for in or for each
also for people that isn't too much into functional methods like map, reduce, ans such, for of is quite a savior.

on the protocol vs interface, I think protocol is better suited in jsland where interfaces only exist on agreements (which some times not everyone agrees the same thing), not enforced in code.

Code of Conduct Report abuse