Y
Hacker News
new
|
ask
|
show
|
jobs
by
coldtea
1863 days ago
"in the usual Python vein of introducing an abstraction to save 2-3 lines"
1 comments
ledauphin
1863 days ago
this is what abstractions are for. they can be done poorly or well, but there's a reason iterators are favored in most use cases over
for (i = 0, i < n; i++) { a[i] }
- they're simpler to reason about because they restrict the conceptual operational space.
link