3 ms·
Yeah I get that, I don't get what it is supposed to say about the domain. Ie. the real-world facts that the data type models. That's why I approve of separating
by FeepingCreature 7y ago
Yeah I get that, I don't get what it is supposed to say about the domain. Ie. the real-world facts that the data type models. That's why I approve of separating option types and range types. "Apply to value if it exists" seems like a different operation from "apply to all values"; even if it's the same one on a deeper level, it feels like it's the same on a level deeper than the reality it represents.
- feanaro 7y agoI think I can somewhat glean what you're saying, but I feel like this is a part of reality, not something beyond it. The fact that this similarity exists between these seemingly disparate things is a part of reality. Consider this: the functor notion is saying that any thing can be put into a list, that any thing can either be present or missing, and so forth. This is a commonality between the concept of list and the concept of possibly-present-thing (an option type). It also allows you to express some very elegant code in a uniform manner. This is not making the claim that they are the one and the same operation on some deeper level, just noticing the commonality and presenting a uniform interface based on the commonality.
- FeepingCreature 7y agoI get the advantages, I'm just uncomfortable with it.
- feanaro 7y agoFair enough.