Mixin : Class that provides certain functionality that can be inherited by subclass. But it is not made to be instantiated self. It can be seen as interface with implemented methods
Self Type : A mixin doesnt depend on any method or fields of class that it is mixed into. Sometimes it is useful to use those. This is known as self Type
Type abstraction
Concepts
Static
Variables have type , values have type and are checked at compile time
Dynamic
Values have types , variables dont have type
Type inference : Compiler try to infer the type at compile time
Macros : Functions loaded at compile time and used by compiler. Compile time meta programming
Self Type : A mixin doesnt depend on any method or fields of class that it is mixed into. Sometimes it is useful to use those. This is known as self Type
Type abstraction
- Parametrization
- Abstract members
Concepts
- Referential transparency : Value can be replaced by expression which calculated that value
- Higher order functions : Functions that take functions as input
- Lexical closures
- Pattern matching
- Single assignment (val)
- LAzy evaluation
- Type inference
- Tail call recursion
- List comprehension
- Monodaic effects
- No side effects
Static
Variables have type , values have type and are checked at compile time
Dynamic
Values have types , variables dont have type
Type inference : Compiler try to infer the type at compile time
Macros : Functions loaded at compile time and used by compiler. Compile time meta programming
No comments:
Post a Comment
Please share your views and comments below.
Thank You.