implicit val option = new Traverse[Option] with MonadPlus[Option] {
def point[A](a: => A) = Some(a)
def bind[A, B](fa: Option[A])(f: A => Option[B]): Option[B] = fa flatMap f
override def map[A, B](fa: Option[A])(f: A => B): Option[B] = fa map f
def traverseImpl[F[_], A, B](fa: Option[A])(f: A => F[B])(implicit F: Applicative[F]) =
fa map (a => F.map(f(a))(Some(_): Option[B])) getOrElse F.point(None)
def empty[A]: Option[A] = None
def plus[A](a: Option[A], b: => Option[A]) = a orElse b
def foldR[A, B](fa: Option[A], z: B)(f: (A) => (=> B) => B): B = fa match {
case Some(a) => f(a)(z)
case None => z
}
}
Excerpt from https://github.com/scalaz/scalaz#type-class-instance-definit.... He says the compiler implementation is a mess. he's still a contributor and involved in the language.
The implementation is a mess because the specification permits so much grammar and syntactic idioms. The moving target and bloated spec is worsened by package version, language mismatches and incomplete repositories. Not everyone needs idiotic languages that ignore 30 years of programming research to coddle their fragile ego. We're not all like you.
Golang is written by Rob Pike. Both languages build upon a legacy and have their pragmatic elements. Second, your argument is basically you aren't smart enough to write/read scala.
The job is to ship features. Clever code and arithmetic bring little value.
How do you know they are men, and why did you bother to check?