News for hackers. Stuff that matters.
Re:What Is Zig's Comptime? by pron on Friday August 09, 2019 @11:59AM (#20655551)
Right. Absolute guarantees can only apply to an algorithm, i.e. the abstract program, under certain assumptions about hardware and OS behavior. The correctness of software, a program running in the real world, is always probabilistic. There was an interesting case of a bug in the Java and Python sorting routines (TimSort) whose probability of manifestation in practice was about the same as a failure due to some hardware malfunction (bit-flip etc.). So you could think about it as if the algorithm was completely incorrect, but the program was about as correct as when running a totally correct algorithm.
Re:What Is Zig's Comptime? by dnautics on Friday August 09, 2019 @12:03PM (#20655593)
I guess you could amend it to 'the type system prevents 100% of reasonably preventable errors of the class'!!