When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited sy…
For mathematicians, = does not mean equality
51–60 of 206 posts
Re: For mathematicians, = does not mean equality
#52When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited sy…
https://en.wikipedia.org/wiki/Assignment_(computer_science)#...
Re: For mathematicians, = does not mean equality
#53Some authors might prefer -- \ / -- 0 Ass opposed to n -- \ / -- i = 1
Re: For mathematicians, = does not mean equality
#54When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited sy…
Go write a couple hundred lines of R (please don't actually do this R is atrocious imo) and then you'll understand why '=' is used instead of '<-' - because it's a pain in the ass, even with hotkeys
Re: For mathematicians, = does not mean equality
#55When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited sy…
Go write a couple hundred lines of R (please don't actually do this R is atrocious imo) and then you'll understand why '=' is used instead of '<-' - because it's a pain in the ass, even with hotkeys
https://stackoverflow.com/questions/1741820/what-are-the-dif...
Re: For mathematicians, = does not mean equality
#56> There is a standard procedure for multiplication, which yields for the inputs 27 and 37 the result 999. What can we say about that? A first attempt is to say that we have an equality "27 x 37 = 999". This equality makes sense in the mainstream of mathematics by saying that the two sides denote the same integer [...] but it misses the essential point: There is a finite computation process which shows that the denotations are equal.
> [...] if the two things we have were the same then we would never feel the need to state their equality. Concretely we ask a question, 27 x 37, and get an answer, 999. The two expressions have different senses and we must do something (make a proof or a calculation, or at least look in an encyclopedia) to show that these two senses have the same denotation.
Re: For mathematicians, = does not mean equality
#57This. It's even more obvious in linear algebra where mathematicians routinely start with the premise "Ax = b", even if there is no solution x that would satisfy the equation exactly.
Re: For mathematicians, = does not mean equality
#58When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited sy…
Re: For mathematicians, = does not mean equality
#59Earlier quoted context omitted.
>> If mutation is so great, why do mathematicians use recursion so much? > Huh? Huh? The deal here is surely that induction and other recursive approaches are conducive to being reasoned about in traditional mathematical contexts (e.g. taking a walk). Mutation is impossible to keep track of, mentally. Though others' mileage will vary on that.
For the record the "Huh? Huh?" is a quote from the article.
There is no karma to be had from complaining about HN's software, and yet it is so very inadequate.
Re: For mathematicians, = does not mean equality
#60When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited sy…
Edit: Misunderstood, thought you were talking about math, not programming languages.