Re:Rust for C++ programmers – part 3: primitive types and op...
by saurik on Wednesday April 23, 2014 @04:41AM
(#7632872)
FWIW, I would not call this "coercion", I'd call this "destruction": while I personally prefer languages that statically don't allow even-potentially-lossy conversions (such as string to number, or float to int) without explicit syntax bounding the error, languages that blow up at runtime if you try to numeric-add "hello" yet accept the string "0" without complaint are "acceptable" in a way that PHP (and MySQL) simply destroying data (whether by replacement or truncation) and returning/storing garbage in an attempt to satisfy the required type constraints is not :/.
[ Parent
| on HN ]
There are no comments on this comment yet.