this post was submitted on 30 Jun 2024
256 points (97.1% liked)
Programmer Humor
32396 readers
696 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Would you mind elaborating a bit for someone who doesn't do much coding? I'm guessing I'm one of the people you're talking about.
The only coding I've done has been via json for raspberry pi, 3d printer, and homeassistant applications.
I know it's a text base language, but how do it's commands relate to integers? I've used boolean, I get that bit.
When passing or storing data in code you usually have to specify what type of data is it. An int is an integer, so numbers, there's also boolean (true/false) and many others. There's also string which is just characters of any kind (for the most part) which pretty much makes it a catch-all, since numbers can be a string along with letters and special characters.
But to use a number as a number after it's been received as a string it has to be converted to an int, which means extra code, more effort, more failure points etc etc.