Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scalaz library import technique reasoning

Tags:

scala

scalaz

Do any of you know why examples from Scalaz always use this import technique:

import scalaz._
import Scalaz._

rather than:

import scalaz.Scalaz._

? I'm trying to understand what the reasoning behind the preference is.

Thanks!

like image 264
Jay Taylor Avatar asked Oct 19 '11 17:10

Jay Taylor


1 Answers

I believe it's because import scalaz._; import Scalaz._ imports all members from the scalaz package and from the scalaz.Scalaz object.

If you will just import import scalaz.Scalaz._, then you only import members from the scalaz.Scalaz object.

like image 61
tenshi Avatar answered Sep 27 '22 23:09

tenshi