rustindia / Rust-for-undergrads

C/C++ programming probelms re-written in Rust
https://rustindia.github.io/Rust-for-undergrads/
GNU General Public License v3.0
253 stars 111 forks source link

[Proposal] Exploiting more Rust features in examples #65

Open k0pernicus opened 6 years ago

k0pernicus commented 6 years ago

Maybe it can be more explicative and useful to learn Rust using more Rust features in those examples. I think, for example, at binary_search.rs, which can include generics and traits (in a very simple way), to understand how/why to use them, and experiment the zero-cost abstraction feature of the Rust programming language.

For that, I propose to write multiple functions that exploit each of those features, or to exploit those features in different source code files.

Are you interested by one of those proposals?

sanjitschouhan commented 6 years ago

@k0pernicus sounds good. We can have these features in different source codes. As the repo will be helping beginners, creating separate source files for same program will be better to understand.