Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, the "=" operator is eas to type since it's on pretty much every keyboard and probably has been for ever. And it's faster than typing a two-symbol operator like := or <- so.

If you want "=" to (more or less) mean what it used to mean "long before computer programming", try Prolog.

  ?- a = a.
  true.

  ?- a = b.
  false.

  ?- A = a.
  A = a.

  ?- A = a, A = b.
  false.

  ?- A = a, A = B.
  A = B, B = a.

  ?- A == B.
  false.

  ?- A = B, A == B.
  A = B.
Nice? Most programmers would pull their hair from the root at all this :)

(hint: "=" is not assignment, neither is it equality and "==" is just a stricter version thereof).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: