top | item 24435265

(no title)

qbonnard | 5 years ago

A math tutor of mine was actually pretty angry at computer science for writing things like `a=1; a=2; //so 1=2 ?` I guess he'd rather have the "assign 42 to age"... Except he'd probably read `42 => age` as "42 implies age", which would probably cause him more sleepless nights ;)

discuss

order

toxik|5 years ago

He’d probably like a := 42 which is in a lot of languages actually! Also Erlang and other fp’s do consider = equivalence.

Izkata|5 years ago

I noticed a year or two ago when I'm pseudocoding I seem to default to "age <- 42" which I kinda like more...

__ryan__|5 years ago

I had the same issue. This is why I always comment my assignments.

    x = x + 1 // assign x to x+1

xthestreams|5 years ago

I can't tell if this is a multiple joke or not

danellis|5 years ago

> math tutor ... angry

It's not the same language, so why should he expect the semantics to be the same?

JadeNB|5 years ago

> It's not the same language, so why should he expect the semantics to be the same?

It's a bit like discovering that inline C in your favourite non-C language isn't actually semantically correct C. If you're a mathematician, then you know, intimately and fluently, how math is spoken and written, so seeing something that looks exactly like "inline math", but isn't, is jarring.

(I don't get angry over it, but it is exactly counter to the extremely delicate and precise way mathematicians train ourselves to think about '='.)

choward|5 years ago

I'm a big fan of immutability and using constantly so I agree with your tutor.