Javascript to Elm
54: Dependent Types
- Author: Vários
- Narrator: Vários
- Publisher: Podcast
- Duration: 0:28:06
- More information
Informações:
Synopsis
yeah, so dependent types? > In computer science and logic, a dependent type is a type whose definition depends on a value. A "pair of integers" is a type. A "pair of integers where the second is greater than the first" is a dependent type because of the dependence on the value. It is an overlapping feature of type theory and type systems. Terms: Set: An unordered collection of unique values Parametric types: Like parametric polymorphism. A function or data type that can be written generically so that it can handle values identically without worrying or knowing their types. An example of this would be append or concat two lists together. append: [a] -> [a] -> [a] Now a while ago, I would have read that and thought, WTF. or maybe the Identity property because it keeps using the a over and over again. BUT with the bit of knowledge on the subject I have I know that append does not care what type you have in the list. A list of Int, or Strings, doesn’t matter, as long as they are the same type i