Hacker News new | past | comments | ask | show | jobs | submit login

A slice is a pointer + a length. Zip takes two iterators and gives an iterator that returns pairs of elements from each of them.

For an imperative translation see https://www.reddit.com/r/programming/comments/5fpghn/zerocos...

Doing an exact translation to C is hard. The C that does the same thing, or C that demonstrates these abstractions that are boiling away?




The thing with C is also that it's hard to do metaprogramming. Example, I have some finite element code that ideally, I would like to run for an arbitrary dimension. In C, this is practically impossible to code efficiently, while in C++ (and I suppose in Rust) I belive this can be done with templates (though I have not too much experience with this).




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: