katy ✨
link
fedilink
141Y

turned out to be a semicolon

The tests wouldn’t even run of that was the issue, pretty sure (depends on the language I suppose)

Victoria
link
fedilink
161Y

fun situations can arise when you write , instead of ; For those not in the know, in c++ the comma operator evaluates the left expression, discards the value, then evaluates the right expression and returns the value. if you now have a a situation like this

int i = 0,
printf("some message");

i has a completely different value, since it actually uses the return value of printf instead

And people give Python shit for significant whitespace 😂

And in python, no less. Sloppy.

I’ll just write thousands of lines of code inside a global object… I’m sure I won’t put a semicolon where a comma should be…

Easy solution:

Find all: ;

Replace with: ,

Create a post

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.
  • 1 user online
  • 61 users / day
  • 247 users / week
  • 417 users / month
  • 2.88K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.9K Comments
  • Modlog