diff --git a/_tour/tour-of-scala.md b/_tour/tour-of-scala.md index 3038b97223..acc29e3ee3 100644 --- a/_tour/tour-of-scala.md +++ b/_tour/tour-of-scala.md @@ -53,3 +53,9 @@ In practice, the development of domain-specific applications often requires doma Scala is designed to interoperate well with the popular Java Runtime Environment (JRE). In particular, the interaction with the mainstream object-oriented Java programming language is as smooth as possible. Newer Java features like [annotations](annotations.html) and Java generics have direct analogues in Scala. Those Scala features without Java analogues, such as [default](default-parameter-values.html) and [named parameters](named-arguments.html), compile as close to Java as they can reasonably come. Scala has the same compilation model (separate compilation, dynamic class loading) like Java and allows access to thousands of existing high-quality libraries. Please continue to the [next page](basics.html) in the Contents menu to read more. + +## Implicit classes in Scala ## +Scala offers a language construct called implicit class which simplifies the creation of classes that provide extension methods to another type.Classes annotated with the implicit keyword are referred to as implicit classes.For an implicit class to work, its name must be in scope and unambiguous. + +## Scala offers string interpolation ## +With mechanism of string interpolation, Scala enables users too embed variables in string literals.Scala offers three string interpolation methods out of the box: `s`, `f` and `raw`.Prepending `s` to any string literal allows the usage of variables directly in the string.Prepending `f` to any string literal allows the creation of simple formatted strings.The raw interpolator is similar to the `s` interpolator except that it performs no escaping of literals within the string.