4 ms·
filter is an operation. As soon as you add an operation that builds the tree, it's imperative. It's okay but that's not fully declarative anymore. Declarative
by aatd86 4y ago
filter is an operation.
As soon as you add an operation that builds the tree, it's imperative.
It's okay but that's not fully declarative anymore.
Declarative is simply descriptive of the structure without specific build instructions if you will.
- eyelidlessness 4y agoIt’s an “operation” in the mathematics sense, but it’s not an operation in the imperative sense. It doesn’t do anything (ie it doesn’t have an effect), it is part of the description. Let’s step back from “if” or “filter”. Suppose you have a basic primitive definition “book”. If you’re to define a taxonomy of types of books, you might start with “fiction” (or “non-fiction”, but this terminology kinda gives away where I’m heading). Okay, so a definition of a book which is fiction might be: fiction-book: book & factual-constraints: none So far we have entirely static definitions (at least within a universe that book-like things need no distinction). We don’t even have to define what could be assigned to factual-constraints. What happens when we try to define non-fiction? We have to define factual constraints it might have. non-fiction-book: book & factual-constraints: all There are some implied conditions here, and we could just stop there. If you have a book and want to know whether it is non-fiction, you must evaluate its non-presence in sets that don’t conform to full veracity (let’s be generous here and pretend non-fiction is honest, and omniscient). But let’s go further, and define so-called “hard science fiction” books (ie there are aspects which might be imaginary but only if the imaginary aspects are conceivable without disputing known facts, I know this is imperfect but I think it’s good enough for the purpose of this discussion): hard-scifi-book: book & factual-constraints: all - known-impossible Uh oh, that’s an operation! Have we started imperatively defining types of books? Nope. We’ve declared how they’re defined, without specifying their inputs, and without affecting them. To the extent the definition itself is correct (exceptions already acknowledged), the definition will always be correct because it’s a tautology. But you can’t have the definition without those conditions, because a definition is a tautology. And that is the tautological definition of a definition. What would make it imperative is if: - the thing itself might change, and so the determination of its definition might change along with it - the determination of its definition might change, and so its previous definition might have been invalidated If neither of those things are true, all of the conditions expressed in definition are declarative.
- aatd86 4y agoI'm not too sure of what you mean. I think it stems from the fact that you are only looking at expressions, forgetting that these are just part of, possibly implicit statements. Basically, there is always an assignment. And that assignment is conditional. That means that you are effectively writing how something is being built instead of simply describing what it is. That is just not fully declarative. That's all.
- eyelidlessness 4y ago> I think it stems from the fact that you are only looking at expressions, forgetting that these are just part of, possibly implicit statements. Pretty close. I’m only looking at expressions because that’s how you can achieve anything declarative. To the point that there are statements (implicit or otherwise), they can’t be declarative whether you have conditions or otherwise. Because… > Basically, there is always an assignment. If you’re restricted to only expressions, this doesn’t matter, because assignment is inherently definitional and idempotent. Assignment with that constraint is logically the same as equality assertion. In fact, some implementations of this concept will literally error if you try to change an assignment. As in: a = b // okay, a is equal to b a = b // yep, this fact has been established, carry on a = c // if c isn’t equal, this will fail and nothing depending on a can proceed > That means that you are effectively writing how something is being built instead of simply describing what it is. Now I don’t understand. How can you define things without constraining what they are? If you don’t have a semantic “not”, every definition you could come up with is inherently the infinite set, even if you define all of the affirmative facts. Without some mechanism to distinguish Thing A from Thing B, you have effectively arrived at two definitions of Things.