▲ | taeric 3 days ago | |||||||||||||||||||||||||||||||||||||||||||
Like I said, I can squint to see what you mean. But people tend to treat types more as what grade schools call units. And those act more as constraints on what you can do with the values. With you doing add/multiply on the values. Note that I'm not necessarily arguing that things should change. At this point, I'd consider the name fairly well established. But, it should be noted much more heavily that you are doing algebra on the types and that this does not imply anything that you can do with the values they may represent at any time. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | dkarl 3 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> But people tend to treat types more as what grade schools call units. And those act more as constraints on what you can do with the values. With you doing add/multiply on the values. Ah, I see. Yes, it doesn't make sense unless you see types as sets of values. I haven't been super deep into type theory, so I don't know how far that definition takes you, but it's the intuitive/naive starting place for understanding the idea of algebraic data types. The addition and multiplication operations are on sets of values and don't have anything to do with adding or multiplying the values themselves. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | mrkeen 3 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
Units also receive the add/multiply treatment. | ||||||||||||||||||||||||||||||||||||||||||||
|