macrame
macrame copied to clipboard
Provide higher-level self-typed traits for enumerations.
Use at Gawker has made it clear that people prefer to use traits rather than use EnumApi
directly, e.g.
trait EnumAsString[Enum] { self: EnumApi[Enum] =>
def asString(e : Enum) : String = asStringImpl(e)
}
Especially when combined with implicit wrapper classes, this really reduces boilerplate. Instead of redefining these all the time it would be better to add them into Macramé. I should also finally get around to publishing macrame-play
and macrame-slick
.
Doobie also looks interesting so probably a macrame-doobie
too once I look into that more.
Adding to this list macrame-scalaz
which implements scalaz.Enum
.