3 ms·
no. a type is a description of a set of values and its associated operations. Types impose global meaning on entities in your program. When something belongs to
by Barrin92 4y ago
no. a type is a description of a set of values and its associated operations. Types impose global meaning on entities in your program. When something belongs to a certain type receivers of arguments of that type lose control over how to interpret them. Thus types introduce coupling.
Names are just labels attached to an entity for the purpose of identification and readability, they don't impose meaning.
- hither_shores 4y agonewtype ArbitrarilyLabeled x = ArbitrarilyLabeled x forgetLabel :: ArbitrarilyLabeled x -> x forgetLabel (ArbitrarilyLabeled x) = x What's the "global meaning" of `ArbitrarilyLabeled`? What control has `forgetLabel` lost?