Scala 2.8 Improves Scala IDE
Scala 2.8 Improves Scala IDE
Join the DZone community and get the full member experience.Join For Free
Java-based (JDBC) data connectivity to SaaS, NoSQL, and Big Data. Download Now.
Uniform collection library
Scala 2.8 features a completely revamped collection library. In past versions of Scala, the collection classes suffered from inconsistencies and a lack of functionality. The library is now organized more efficiently, allowing easier implementation of new collections. The design optimizes sharing and code reuse while maintaining backwards compatibility.
Named and default arguments
Named and default arguments work together so developers can choose one parameter by name and use defaults for the others. Named arguments look like assignments to the called method's formal parameter names. Default arguments reduce code duplication and they enable "copy" methods for case classes. This allows generation of quickly modified case class copies. The named arguments can be used to selectively change copied instance values.
New array implementation, manifests for polymorphic arrays
Array handling has been optimized and simplified in Scala 2.8. The scheme uses implicit conversations and manifests to integrate arrays into the new collection library. This method is much more predictable in terms of implicit conversions.
Scala 2.8's specialized type parameters allow the compiler to transparently generate multiple versions of a definition. The type parameters also use the most specific version if the static type information at a call site allows it.
Package objects options
Besides classes and objects also methods can now be contained within packages. They are added by declaring a package object. The Scala Team says Package objects are still a work in progress and could see more improvements before the GA release.
Scala Swing libraries
The Scala Swing libraries have grown in 2.8 and the documentation has improved. There are additional demos, the window subhierarchy has been refactored, components publish key events, impute events can be consumed, there's lazy Swing listener installation, and more complete component caching.
Along with bug fixes, the history is now searchable and there's integrated shell access. There's tab-completion for all packages on the classpath along with object and instance methods and fields, including type aliases and package objects. The power mode offers direct access to compiler internals.
There is now support for nested java annotations. For annotations on fields, developers can specify which synthetic members (getter / setter) will have the annotation.
The new compiler infrastructure for Scala 2.8 provides a better platform for building IDE plugins. Speed is up by 50% in some cases and a new build manager is available.
Scala Eclipse Plugin
The Scala plugin for Eclipse has improved JDT integration and a new build manager. The plugin will be getting its own launch schedule and does not support Scala 2.7 or lower. The Scala IDE has been reworked so that it can be reused by non-Eclipse IDEs
There are graphical improvements in Scaladoc 2 along with automatic comments expansion. There's now a wiki-like syntax and compile-time error checking as well.
During long downloads and dependency audit diagnostics, Sbaz gives better feedback. Support for pack200 has been added, which reduces file sizes by 70% in some cases. Sbaz can now update itself reliably and it can work on Windows using cmd or cygwin.
The new Scalap is aware of package objects and can decompile them by using <package_name>.package
Opinions expressed by DZone contributors are their own.