[theory] What is a type?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Jan 15 20:56:42 UTC 2018
On Monday, 15 January 2018 at 19:25:16 UTC, H. S. Teoh wrote:
> At the most abstract level, a type is just a set. The members
> of the set represent what values that type can have.
Hm, yes, like representing an ordered pair (a,b) as {{a},{a,b}}.
But I think typing is more commonly viewed as a filter. So if you
represent all values as sets, then the type would be a filter
preventing certain combinations.
It is a matter of perspective, constructive or not constructive.
Kinda like synthesis, additive (combine sines) or subtractive
(filter noise).
More information about the Digitalmars-d
mailing list