How will Dotty change pure functional programming in Scala?
In this question from 2013, Mr. Odersky notes that "it's too early to tell" whether libraries like Scalaz will be able to exist (at least in their current state) under Dotty, due to the castration of higher-kinded and existential types.
In the time passed, has Dotty's implications for Scalaz & Cats been elucidated? Will proposed features like built-in Effects and Records change the scope of these projects?
I understand that Dotty is still a ways off from replacing scalac, but as I am considering investing time applying purely functional constructs and methodologies to my work, I believe it important to consider the future of its flagship libraries.
One example of the latest on Dotty is "Scaling Scala" By Chris McKinlay (December 15, 2016) (the same article also mention the Scalaz and Cats situation)
Martin Odersky has been leading work on Dotty, a novel research compiler based on the Dependent Object Types (DOT) calculus (basically a simplified version of Scala) and ideas from the functional programming (FP) database community.
The team working on Dotty development has shown some remarkable improvements over the state of the art, most notably with respect to compilation times. I asked Odersky what he thought was novel about the Dotty architecture and would help end users. Here's what he said:
Two things come to mind:
Although Dotty opens up a number of interesting language possibilities (notably full-spectrum dependent types, a la Agda and Idris), Odersky has chosen to prioritize making it immediately useful to the community. Language differences are fairly small, and most of them are in order to either simplify the language (like removing procedure syntax) or fix bugs (unsound pattern matching) or both (early initializers).
Still, I couldn't resist asking him if there is any chance of full-spectrum dependent types ending up in Scala at some point. Here is what he said:
Never say never :-). In fact, we are currently working with Viktor Kuncak on integrating the Leon program prover with Scala, which demands richer dependent types than we have now. But it's currently strictly research, with a completely open outcome.
The Scala and Dotty teams are working closely toward convergence for Scala 2.x and Dotty, and they've indicated that they take continuity very seriously. Scala 2.12 and 2.13 have language flags that unlock features being incubated in Dotty (eg, existential types), and the Dotty compiler has a Scala 2 compatibility mode. There's even a migration tool.
链接地址: http://www.djcxy.com/p/37324.html上一篇: Android:音频匹配(音频指纹识别)