![]() ![]() The new version will be able to target JDK 1.5, 1.6 and 1.7.Dynamic and Applydynamic: x.foo can now be written as x.applyDynamic(“foo”) if foo is not defined by x’s type, but is a subtype of Dynamic.A promise is like a writable, single-assignment container, which completes a future. Futures and Promises: Futures can run many operations in parallel in an efficient and non-blocking way.String Interpolation: With the addition of string interpolation users can now add variable references directly in processed string literals.Implicit Classes: One can now use the implicit modified to class definitions further reducing the boilerplate code required for implicit wrappers.Value Classes: In this version, by extending naval the class can now behave like a struct type.Now the Primitive types and their boxed versions will be implicitly converted, in both directions. Multiple fixes are pushed towards JavaConverters and JavaConversions allowing smooth interoperation.A new tool for customization of the initialization sequence of classes and objects is provided by the DelayedInit trait.Thread-safe App trait replaces the Application trait.One can find parallel collections in package Parallel collections are useful as they utilize the multicore processors by implementing the filter, map, foreach, etc in parallel. This can be done using its new par method. From this version onwards every collection can be converted to its corresponding parallel implementation.For annotations on fields, it allows specifying which synthetic members (getter/setter) will have the annotation. Improved Annotations: Support for nested java annotations.They can be added to a package by declaring a package object. Package Objects: From this version onwards Packages can now have fields or type aliases apart from classes and objects.Code duplication is reduced by the use of Default args. Readability is improved by using Named args for a method call with many args. Named and Default Arguments: Added support for Named and Default args.Type Specialisation: The compiler will generate multiple versions of a given definition and will use the most specific version when the static type info at the call site allows it. ![]() Case Classes Functionality Extended: In every case now class a companion extractor object is generated by scala compiler.Java Generic Types Supported by Default: Translation of generic Java types such as ArrayList to a generic type in Scala: ArrayList.Structural Types: It allows declaring structural types using type refinements.Lazy Values: It allows defining lazy value declarations using the new modifier lazy.Existential Types: It allows defining existential types using the new keyword forSome.Refined Pattern Matching Anonymous Functions: It is now possible to use case clauses to define a function value directly for functions of arities greater than one.īelow are the changes that went towards the 2.6.0 version,.Implicit Anonymous Functions: It is now possible to define anonymous functions using underscores in the parameter position.It will be deprecated in future versions. For-Comprehensions, Revised: Change in the syntax of for-comprehensions.Early Object Initialization: It allows initializing some fields of an object before any parent constructors are called.Below are some of the main features in this version, Web development, programming languages, Software testing & others Scala Versionsīelow are all the versions in Scala up to date and with the main features in all the versions: VERSION 2.5.0Ģ.5.0 was released around May 2007. ![]()
0 Comments
Leave a Reply. |