macrame icon indicating copy to clipboard operation
macrame copied to clipboard

Provide higher-level self-typed traits for enumerations.

Open ClaireNeveu opened this issue 8 years ago • 2 comments

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.

ClaireNeveu avatar Apr 02 '16 18:04 ClaireNeveu

Doobie also looks interesting so probably a macrame-doobie too once I look into that more.

ClaireNeveu avatar Apr 02 '16 18:04 ClaireNeveu

Adding to this list macrame-scalaz which implements scalaz.Enum.

ClaireNeveu avatar Apr 03 '16 16:04 ClaireNeveu