Simple Console Input API for Standard Library

by a guest · 3 years ago
We are trying to push a simple console input API into the standard library to make writing simple command line input easier, and we need the community to decide on how advanced the implementation should be. Since this is quite a controversial topic (very even amount on each side), this poll was made to settle this. NOTE: These examples below are not final, just a concept for what it might look like. Simple Input Example: """ let age: i32 = std::inputln!()?.parse().expect("Invalid age!"); """ Advanced Input Example: """ let person = scan!("{} {}", String, u8).expect("Invalid input!"); // or let name: String; let age: u8; scan!("{} {}", name, age).expect("Invalid input!"); """
Make a choice:
Poll options
Results

Comments

No comments yet. Be the first to write one!

This content is neither created nor endorsed by StrawPoll.

Create Your Own Poll

Want to create your own poll? With StrawPoll anyone can easily create an online poll in seconds.