this post was submitted on 17 Sep 2023
429 points (96.5% liked)

Programmer Humor

19480 readers
178 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 18 points 1 year ago (1 children)

If working with currency use types and formating functions appropriate for currency. Not float.

[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago)

I was recalling a project in perl, which doesn't have a variety of types. If you add values, you get a scalar, which will be a float if the numbers are not integers.

I am aware my statement isn't true in several languages