What are type projections useful for?

前端 未结 2 1941
心在旅途
心在旅途 2021-01-31 05:44

What are type projections in Scala useful for? Why does Scala\'s type system support both type projections and path dependent types? What was the rationale behind this design de

2条回答
  •  一向
    一向 (楼主)
    2021-01-31 05:55

    One thing type projections can be used for is partial type application:

    ({type λ[x]=Tuple2[Int,x]})#λ
    

提交回复
热议问题