Hacker News new | ask | show | jobs
by bazoom42 17 days ago
A cast is an explicit syntax which let the programmer say “I know more than the compiler”. If you don’t, don’t use cast.

If the conversion is safe (eg converting from an integer to decimal) then the cast syntax is unnecessary.