Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

3.2 Semantic Differences (both compile, different behavior)

These patterns compile in both udewy and Dewy but may behave differently:

Patternudewy BehaviorDewy Behavior
x >> n (when x is signed)Unsigned shift (zeros fill)Signed shift (sign bit fills)*
a and b / a or bBoth sides always evaluated*Short-circuit evaluation
str1 =? str2Compares pointersCompares content

NOTE: Dewy selects signed or unsigned shift based on left operand type.

NOTE: and / or can short-circuit in udewy when they are the condition in an if or loop expression (which matches regular dewy behavior).

In general, using any of these differences is considered not well-formed.