5 ms·
And what about starting out with something like: data ParaBool = False | True -- | Both - if needed for three valued logic Then implement your operator
by szemet 7y ago
And what about starting out with something like:
data ParaBool = False | True
-- | Both - if needed for three valued logic
Then implement your operators. Then everything is what it is defined to be. How can this be worse than sneakingly changing semantics of already defined things?
In a free world it should be legal to sell copper as gold, call the lies truth, and mix newborns in hospital - and people are just stupid if they want laws against these... ;)
- ukj 7y agoStrawman. You are conflating denotational semantics [1] with operational semantics [2]. In the free world, a pilot is free to recognize that the 'already-defined autopilot' is doing something stupid/dangerous (despite all the green lights) and is able to take control of the system at run-time - he doesn't have the luxury of fixing this bug at compile-time. In a free world people are allowed to "sneakily change their minds" when they see an obvious denotational error. Beware of bugs in the above code; I have only proved it correct, not tried it. --Donald Knuth Type safety is not the same thing as system safety. The latter cannot be formalized - that is why humans are in charge. Not algorithms. Making laws against airplanes crashing is not the same thing as stopping airplanes from crashing. Here is a relevant extract from this paper[3]: "All ambiguity is resolved by actions of practitioners at the sharp end of the system. After an accident, practitioner actions may be regarded as ‘errors’ or ‘violations’ but these evaluations are heavily biased by hindsight and ignore the other driving forces, especially production pressure. " [1] https://en.m.wikipedia.org/wiki/Denotational_semantics https://en.m.wikipedia.org/wiki/Denotational_semantics [2] https://en.wikipedia.org/wiki/Operational_semantics https://en.wikipedia.org/wiki/Operational_semantics [3] https://web.mit.edu/2.75/resources/random/How%20Complex%20Systems%20Fail.pdf https://web.mit.edu/2.75/resources/random/How%20Complex%20Sy...
- the_af 7y ago> Strawman. You are conflating denotational semantics with operational semantics But your trick is neither. The law of non-contradiction refers to the same proposition P in both positions, simultaneously: > "To express the fact that the law is tenseless and to avoid equivocation, sometimes the law is amended to say "contradictory propositions cannot both be true 'at the same time and in the same sense'" [0] Yours isn't "at the same time" because each evaluation of P (which in your case is a programming function with side effects, neither a proposition nor a mathematical function) depends on the other evaluation to cause a side effect. So you're cheating, you haven't expressed anything innovative or outside the realm of other languages (including Haskell), and you haven't broken the law of non-contradiction. [0] https://en.m.wikipedia.org/wiki/Law_of_noncontradiction https://en.m.wikipedia.org/wiki/Law_of_noncontradiction
- ukj 7y ago>The law of non-contradiction refers to the same proposition P in both positions, simultaneously You are describing quantum superposition, but then you are straddling the classical and quantum paradigms when interpreting the LNC. How many instructions/CPU cycles does it take to evaluate p ∧ ¬p? More than 1? Then what do you even mean by "simultaneously"? >which in your case is a programming function with side effects, neither a proposition nor a mathematical function You are making my argument for me. The LNC is an axiom of Mathematics/Logic. It's not a law as in a law of physics. And so if a physical system happens to violate it - it's hardly a big deal. The real world actually contains things which are in two (or more) states simultaneously. We call them cubits and we use them to represent uncertainty. What I have shown is a mutating getter. It's not supposed to be novel or original (I don't know why you are measuring me up to such ludicrous ideals). I am simply demonstrating to you a real-world scenario in which interacting with a system alters its state (deterministically or otherwise) which allows me to do the "impossible": evaluate p ∧ ¬p as True. It's just a race condition. Side-effects are the norm, not the exception throughout the universe in general. Your classical computer would have no CPU registers, no cache, no memory, no persistence without side effects. If the Mathematical religion frowns upon side-effects, why should I care about it when it clearly doesn't correspond to the universe I live in? And if you are upset about my "trickery" (oh no! Physics is cheating!) here is an implementation that doesn't mutate global state. https://repl.it/repls/CompassionateImmenseConditional https://repl.it/repls/CompassionateImmenseConditional
- the_af 7y ago> What I have shown is a mutating getter. It's not supposed to be novel or original A mutating getter doesn't violate the laws of non-contradiction, because a getter is not a proposition. In fact, if you use a getter at all, you're outside non-contradiction. The rest of your post is ridiculous, but feel free to keep equivocating this with quantum physics or cubits or whatever, instead of acknowledging that rather than breaking the law of non-contradiction, your real assertion is "my language can mutate global variables behind the scenes". Much less impressive, right? Also, you keep avoiding to mention what your "problem space" is. I suspect this is because your "problem space" is rather pedestrian and doesn't require anything you claim it does. Not upset, by the way. That's chicanery on your part. Usually done by people who know they are losing the argument ;)