Created
August 4, 2016 13:30
-
-
Save killercup/68645e903a2f903cf43d3070d562a809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused_variables)] | |
// Easy for API author, easy to read documentation | |
fn foo(lorem: &str, ipsum: Option<i32>, dolor: Option<i32>, sit: Option<i32>) { | |
println!("{}", lorem); | |
} | |
fn main() { | |
foo("bar", None, None, None); // That looks weird | |
foo("bar", Some(42), None, None); // Okay | |
foo("bar", Some(42), Some(1337), Some(-1)); // Halp! Too… much… Some…! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment