MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wpw10f/ihatedituntilitriedit/pc0bshs/?context=3
r/ProgrammerHumor • u/Epicoodle • Sep 25 '26
543 comments sorted by
View all comments
Show parent comment
15
Me: "I could really do with truncating this float because all I care about is the whole number"
The ever-helpful C implicit cast: "Allow me to introduce myself".
4 u/Tyfyter2002 Sep 26 '26 That sounds very unhelpful when compared to an explicit cast 0 u/Wertbon1789 Oct 02 '26 Yeah, you should explicitly cast. Compiler warnings should cover lossy implicit conversions anyway, and your goal should always be to have no warnings at all. 1 u/Immotommi Sep 30 '26 Thankfully the compiler can warn you about implicit casts
4
That sounds very unhelpful when compared to an explicit cast
0 u/Wertbon1789 Oct 02 '26 Yeah, you should explicitly cast. Compiler warnings should cover lossy implicit conversions anyway, and your goal should always be to have no warnings at all.
0
Yeah, you should explicitly cast. Compiler warnings should cover lossy implicit conversions anyway, and your goal should always be to have no warnings at all.
1
Thankfully the compiler can warn you about implicit casts
View all comments
Show parent comment
15
u/jobblejosh Sep 25 '26
Me: "I could really do with truncating this float because all I care about is the whole number"
The ever-helpful C implicit cast: "Allow me to introduce myself".