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

I think this is probably true too, that they didn't want to have a separate operator just to reassign a reference. I think it could have been made to work, but just wasn't worth it.

Fortran for example has this - pointers in fortran behave like value types (like C++ references) when performing operations on them, however there is a special => operator to change the actual pointer. I never used operator overloading in fortran but I don't think it would be much of an issue, you would be able to overload the operator for anything except a pointer type.



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

Search: