6 ms·
I think you just made an equivocation as those Time.now’s are not the same A = Time.now A != Time.now A == A Just because Time.now looks like the same s
by logical_proof 5y ago
I think you just made an equivocation as those Time.now’s are not the same
A = Time.now
A != Time.now
A == A
Just because Time.now looks like the same symbol it is not as it is an impure function that never returns the same result.
- ukj 5y agoWe are not talking about the same computation. What you think I mean is [1]. What I actually mean is [2]. [1] pry(main)> eval("a != a") NameError: undefined local variable or method `a' for main:Object from (pry):1:in `eval' [2] pry(main)> eval("Time.now != Time.now") => true I am not assigning the function to a variable - I am lazy-evaluating it. It's not equivocation because [2] is expressed exactly the same way in English. Now is not now. It is trivially true. When I use a word, Humpty Dumpty said in rather a scornful tone, it means just what I choose it to mean — neither more nor less
- the_af 5y agoI disagree, because in both programming languages and in natural language, "now" is not a constant: it's a function that returns a different value depending on when it's called. While the syntax is "now", what you're really saying is now(Ti) for some i. So the sentence, in both natural language and most programming languages becomes: now(T0) != now(T1) Which is easier to understand, with all arguments made explicit. Now, some "clever" programming language might automatically translate this from now != now To a := now(T0) a != a Which will be surprising to the programmer in most cases (but might be what's desired in others). The important thing is that "now" is not a comstant, but a function.
- ukj 5y agoYes! "Now" is not a constant. It's a function. It's a function that takes no arguments. It's also a function that can be lazy-evaluated. f() != f() A != A You seem to be agreeing with me but your response to me starts with the English phrase "I disagree".
- the_af 5y agoI disagree, that's the thing: "now" is a function that takes one implicit argument: time. So "now" is a trickery to hide the fact you're really saying "now(Ti)", for varying i. I'm not tripping over syntax, but I think you are: You think you're saying A != A When you're really saying A1 != A2 (Or rather now(t0) != now(t1) ) And of course the second form is unsurprising.
- ukj 5y agoYou are talking about a different function. The function I am talking about doesn't take any arguments. [1] pry(main)> Time.now(1) ArgumentError: wrong number of arguments (given 1, expected 0)
- the_af 5y agoIt doesn't take an explicit argument, but time is definitely an implicit argument of your function; how else do you think the function is implemented?
- ukj 5y agoWe are talking about function declaration not implementation, right? The expression A = A can be trivially re-written in another notation as equal(A,A). The reason you don't question the implementation of the equal() function is because it's declared as being true however it's implemented. So, I declare f() != f() as being true. I also declare that f() takes no arguments. All I am doing is translating (transpiling?) English into Ruby. "Now is not now" => "Time.now != Time.now" Talking about function arguments is not even in point. What's the argument to now() in English?
- dragonwriter 5y ago> All I am doing is translating (transpiling?) English into Ruby. Incorrectly. > "Now is not now" => "Time.now != Time.now" Sure, “Now (pointedly looks at watch) is not now (pointedly looks at watch)” is true, and the equivalent of the Ruby. Ruby expressions lack the implicit simultaneity that English sentences wthout some contextual signal of explicit time dependency have, and your mistranslation ignores this.