News for hackers. Stuff that matters.
Re:Pointer Free Programming and the Future of Nim by hamstergene on Friday October 20, 2017 @08:33AM (#15515232)
There is a third option to crashing vs. not crashing: not letting the code compile if there is any chance it might crash. That is what this "buzz about null pointers" is about.
Re:Pointer Free Programming and the Future of Nim by cytzol on Friday October 20, 2017 @09:20AM (#15515509)
Oh, right. Yeah, that would be nice, but my company doesn't use languages with that feature, and we can't re-write our software, so we're stuck with Option types.
Re:Pointer Free Programming and the Future of Nim by Jach on Friday October 20, 2017 @09:35AM (#15515601)
What magic compiler can certify my program will never abruptly stop, or worse do something unintended, because of hardware failure?
Re:Pointer Free Programming and the Future of Nim by pjc50 on Friday October 20, 2017 @10:34AM (#15516079)
I detect a moving goalpost here, but if you're genuinely concerned that hardware might change the value of your bits then nothing else but lockstep execution will help. e.g. TI Hercules: http://www.ti.com/lsds/ti/microcontrollers-16-bit-32-bit/c20...

(Checking for NULL in your program won't save you from hardware failure either)

Re:Pointer Free Programming and the Future of Nim by Jach on Friday October 20, 2017 @11:55AM (#15516757)
I hope I'm just being pedantic rather than moving goalposts, I'm all for better assurances. To me the only compiler "not letting the code compile if there is any chance it might crash" is either magical or never compiles a thing.
Re:Pointer Free Programming and the Future of Nim by pjc50 on Friday October 20, 2017 @12:04PM (#15516843)
"not letting the code compile if there is any chance it might crash"; well, normally we assume correct operation for the hardware here in order to make that achievable, otherwise things could simply crash at any time. You're always vulnerable to single-event-upsets from cosmic rays or even alpha decay inside the chip packaging. Being pedantic about this in a discussion of compiler correctness is useless derailing.

"Rowhammer" over in https://news.ycombinator.com/item?id=15515044 is perhaps the most likely problem of hardware non-correctness to worry about.

Re:Pointer Free Programming and the Future of Nim by Jach on Friday October 20, 2017 @03:15PM (#15518465)
When talking correctness (or security) I would think pedantry would be more welcome. I think you have a point on derailment if the comment I replied to had given a specific example that refused to compile anything with a chance of crashing, e.g. through guarantees of its type system, and then I come along asking about cosmic rays. But they didn't, they were vague, and I'm still left wondering of an example because even Haskell programs crash with a segfault or bus error sometimes. It's perfectly fine that it can't cover those cases but a compiler did sign off on a program with a chance of crashing, no cosmic rays involved, at best it only assures less likelihood of crashing compared to another compiler.