Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do this right now with an iterator adaptor and some range trickery. The c++ range based for loop already enables the same behavior as python. The only thing missing is a standard enumerate function.

This is a Fine addition to c++ due to how c++ uses lifetimes for resource management but the syntax is convoluted and the claim that this is intended to enable enumeration is... Just silly.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: