3 ms·
This isn't a way of learning programming. It's a way of learning about the variation in the language design space. That includes teaching the very point you're
by skrishnamurthi 8y ago
This isn't a way of learning programming. It's a way of learning about the variation in the language design space.
That includes teaching the very point you're talking about. There is nothing in the mystery language approach that precludes having programs whose behavior is non-deterministic, and this would then show students to prepare for it. Indeed, it's an excellent kind of mystery language, by providing a sandboxed version that can focus precisely on non-determinism.
(I will not reveal whether such behavior exists in the current suite or not, to avoid giving away solutions.)
- elfprince13 8y agoYeah, debugging possible outcomes of undefined behavior in C/C++ is pretty much exactly a mystery language exercise. With older compilers, the usual question is "Will `-2 >> 1` perform sign extension or not?" With modern compilers, the usual question is "What arbitrary constant can the compiler choose for `-2 >> 1` to maximize the number of provably dead code paths?"