Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
import tango.io.Stdout; template Field (char[] name) { mixin("public char[] name = `" ~ name ~ "`;"); static this () { Stdout("First").newline; } template min (int i, char[] name_ = name) { static this () { Stdout("Min").newline; } } template max (int i, char[] name_ = name) { static this () { Stdout("Max").newline; } } } class Model { mixin Field!("username").min!(5); } void main () { Model model = new Model(); }
From the Design Piracy series on my blog: