- Which type constraints can you name?
There are two constraints: the lower bound or subtype relation and the upper bound or supertype relation.
- What implicit type constraints are added to a type if there are no type constraints defined on it by the developer?
For missing upper bound, the compiler adds Any as a constraint, and, for missing lower bound–Nothing.
- Which operators can be used to refer to the nested type of some type?
There are two operators. The notion A#B refers to the nested type of the A type. The notion of a.B refers to the B subtype of the instance a.
- Which type can be used as an infix type?
Any type which is parameterized by exactly two type parameters.
- Why is the use of structural types discouraged in Scala?
Use of structural types often leads to generated byte code, which accesses methods via reflection, which is slower than normal...