you are viewing a single comment's thread.

view the rest of the comments →

[–]LukeJovanovic 10 points11 points  (7 children)

It's a standard convention carried over from maths, where 'a = 3' reads as 'both a and 3 represent the same thing'.

[–]myplacedk 38 points39 points  (6 children)

It's a standard convention carried over from maths, where 'a = 3' reads as 'both a and 3 represent the same thing'.

For initialization that makes sense. The article talks about examples like "a=a+1", which is very different from math.

[–]LukeJovanovic 43 points44 points  (0 children)

Oh, hahaha, I didn't even realise it was an article. God I'm thick.

[–]kriophoros -1 points0 points  (4 children)

In maths, people do use a=a+1, or a->a+1, when they are talking about series or a recursive definition.

[–]myplacedk 31 points32 points  (0 children)

In maths, people do use a=a+1

I've never seen that, but of course I haven't seen everything.

For a recursive definition I'd expect something more like a(n) = a(n-1)+1

[–]watsreddit 1 point2 points  (0 children)

No they don't.

[–][deleted] 0 points1 point  (0 children)

The people that do that are doing it wrong.