|
quote:If an operator has no whitespace on the left but is followed immediately by a dot (.), it is treated as a postfix unary operator. As an example, the ++ operator in a++.b is treated as a postfix unary operator (a++ . b rather than a ++ .b). I can't find documentation on how newlines are handled semantically. Does Swift use Clang's modules system? Neat features: Explicitly opting into nulls. Implicit break / explicit fallthrough on switch statements. Checked arithmetic operations return an error, but how can you handle it?
|
# ¿ Jun 3, 2014 05:02 |
|
|
# ¿ May 2, 2024 08:53 |
|
rjmccall posted:Hmm. We should definitely provide operators that return an overflow bit back. I'll file that. The language used in the documentation is somewhat confusing -- normally arithmetic overflow behaviors are truncate/wrap, saturate, trap/except, widen, undefined. Truncating addition is a clearer name for +& than overflow addition. Scaevolus fucked around with this message at 04:37 on Jun 5, 2014 |
# ¿ Jun 5, 2014 04:31 |
|
Axiem posted:This might be my lack of functional programming background speaking here, but what's the big deal with tail recursion? And why would I as a programmer even care whether or not the language is doing it--isn't it something under the hood anyway? Some algorithms are naturally expressed as recursive functions. Writing recursive functions without a language promise that they'll be turned into tail calls (jump instead of call) is a quick way to overflow your stack.
|
# ¿ Jun 22, 2014 06:45 |