this post was submitted on 30 Jun 2024
252 points (97.0% liked)

Programmer Humor

32453 readers
317 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

Meme transcription:

Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?

Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”

you are viewing a single comment's thread
view the rest of the comments
[–] scrubbles@poptalk.scrubbles.tech 7 points 4 months ago

Until you get to multi currency, which is why I don't support using ints or longs, and strings are still the only way. There are currencies that have no precision, and others that have 3 or more digits of precision - and then you're looking at doing calculations each time. Strings are the safest way to make sure you're representing exactly what you want to when sending data over the wire or persisting