|
|
|
|
|
by yummyfajitas
4532 days ago
|
|
Yes, and there is a good reason why Scalaland uses types. Consider a Spray-like API using only maps: val cookies = Map("sessionid" -> "1234567")
val headers = Map("Content-Type" -> "application/javascript")
setCookies(headers) {
setHeaders(headers) {
complete { obj }
}
}
With Scala's "make everything a different type" approach, that's a compile error - setCookies will expect a List[Cookie], not a List[HttpHeader].Those of us living in Scalaland are not as smart as the Clojure guys. We make mistakes sometimes and find it handy when the compiler yells at us. |
|