ABSTRACT
Safe object initialization is important to avoid a category of runtime errors in programming languages. In this paper, we provide a case study of the initialization patterns on the Dotty compiler. In particular, we find that calling dynamic-dispatching methods, the usage of closures and instantiating nested classes are important for initialization of Scala objects. Based on the study, we conclude that existing proposals for safe initialization are inadequate for Scala.
- Joseph Yossi Gil and Tali Shragai. 2009. Are We Ready for a Safer Construction Environment?. In European Conference on Object-Oriented Programming. Springer, 495-519. Google ScholarDigital Library
- Martin Odersky et al. 2013. Dotty Compiler: A Next Generation Compiler for Scala. https://web.archive.org/web/20170325001401/http://dotty.epfl.ch/.Google Scholar
- Xin Qi and Andrew C. Myers. 2009. Masked Types for Sound Object Initialization. In Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '09). ACM, 53-65. Google ScholarDigital Library
- Alexander J Summers and Peter Müller. 2011. Freedom before commitment: a lightweight type system for object initialisation. In ACM SIGPLAN Notices, Vol. 46. ACM, 1013-1032. Google ScholarDigital Library
- Yoav Zibin, David Cunningham, Igor Peshansky, and Vijay Saraswat. 2012. Object initialization in X10. In European Conference on Object-Oriented Programming. Springer, 207-231. Google ScholarDigital Library
Index Terms
- Initialization patterns in Dotty
Recommendations
Implementing higher-kinded types in Dotty
SCALA 2016: Proceedings of the 2016 7th ACM SIGPLAN Symposium on Scaladotty is a new, experimental Scala compiler based on DOT, the calculus of Dependent Object Types. Higher-kinded types are a natural extension of first-order lambda calculus, and have been a core construct of Haskell and Scala. As long as such types are ...
Oberon-0 in Kiama
The Kiama language processing library is a collection of domain-specific languages for software language processing embedded in the Scala programming language. The standard Scala parsing library is augmented by Kiama's facilities for defining attribute ...
Interactive development using the Dotty compiler (tool paper)
SCALA 2017: Proceedings of the 8th ACM SIGPLAN International Symposium on ScalaA programming language is only as good at its tooling. Traditionally, tooling has always been an after-thought of language design since developing good tools take significant development efforts. Dotty is an experimental compiler for what will one day ...
Comments