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

It's unclear what language that is. Could that be (well-defined) Java?

Besides, it's also wrong because left shifting a signed integer "into the sign bit" is undefined.



Author is apparently trying to combine multiple languages. Maybe well defined in java, definitely not in C.


In the original Chinese article, the languages were actually mentioned. And the one we're discussing is C++. (And so as you point out, wrong.)

It annoys me that this kind of vacuous article is posted. It reminds me of an old rant about Perl tutorials: http://blogs.perl.org/users/mithaldu/2011/10/perl-tutorials-...




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

Search: