you didn't consider at all what I said about wrapping. unions can express `int | int` simply by wrapping them, like polymorphic variants forces you to.
Suppose I would add an optional else branch to the for statement, with whatever semantics. Or even harder, that I would allow the programmer to define custom ternary operators, with the third operand being optional.
How to design it so that it would not surprise programmers get used to similar co...
I am working on a new backend for a programming language using LLVM IR. This language makes a distinction between basic values and pointers to nodes on the heap, and uses a copying collector for memory management. In an existing backend for this language, basic values are kept on the system stack...
By the C standard and the C++ standard:
$\log(0+0i) = -\infty+0 i$.
$\log(0-0i) = -\infty-0 i$.
$\log(-0+0i) = -\infty+\pi i$.
$\log(-0-0i) = -\infty-\pi i$.
However, if the floating-point complex zero is understood as the "absolute" zero plus some infinitesimal toward a specific quadrant in th...