News for hackers. Stuff that matters.
Re:Ask HN: Does anyone have something negative to say about ... by RNeff on Wednesday July 25, 2018 @02:04PM (#17611369)
Integer divide by zero does NOT raise an exception.

From the Spec: We considered raising exceptions on integer divide by zero, with these exceptions causing a trap in most execution environments. However, this would be the only arithmetic trap in the standard ISA (floating-point exceptions set flags and write default values, but do not cause traps) and would require language implementors to interact with the execution environment’s trap handlers for this case. Further, where language standards mandate that a divide-by-zero exception must cause an immediate control flow change, only a single branch instruction needs to be added to each divide operation, and this branch instruction can be inserted after the divide and should normally be very predictably not taken, adding little runtime overhead.

Re:Ask HN: Does anyone have something negative to say about ... by nine_k on Wednesday July 25, 2018 @02:11PM (#17611423)
Is this a genuinely bad decision? The spec makes a good job arguing why it's not.
Re:Ask HN: Does anyone have something negative to say about ... by majewsky on Wednesday July 25, 2018 @02:29PM (#17611608)
Those are arguments in favor of this design choice. What are the arguments against it?
Re:Ask HN: Does anyone have something negative to say about ... by phaedrus on Wednesday July 25, 2018 @03:05PM (#17611902)
The reasoning given here for some reason reminds me of Parallax's decision not to add interrupts to the Propeller 1 design.
Re:Ask HN: Does anyone have something negative to say about ... by nickik on Wednesday July 25, 2018 @03:06PM (#17611914)
The main reason that this is not in is that in many embedded application it is simply not needed.

The 'J' extension for managed languages will probably add these things.