Just finished two weeks of workshops and am exhausted, so this one will be light.
Hanuka Sale
Logic for Programmers is on sale until the end of Chanukah! That's Jan 2nd if you're not Jewish. Get it for 40% off here.
Stroustrup's Rule
I first encountered Stroustrup's Rule on this defunct webpage:
One of my favorite insights about syntax design appeared in a retrospective on C++ by Bjarne Stroustrup: For new features, people insist on LOUD explicit syntax.
explicit syntax. For established features, people want terse notation.
The blogger gives the example of option types in Rust. Originally, the idea of using option types to store errors was new for programmers, so the syntax for passing an error was very explicit:
let file = match File :: open ( "file.txt" ) { Ok ( file ) => file , Err ( err ) => { return err ; } }
Once people were more familiar with it, Rust added the try! macro to reduce boilerplate, and finally the ? operator to streamline error handling further.
... continue reading