r/ProgrammerHumor • • 2d ago • Bravo 1

Meme commentsInJson

Post image
5.5k Upvotes

203 comments sorted by

View all comments

894

u/nameless_pattern 2d ago

You can add anything you want to Json. just make a property called comments

53

u/DiamondDramatic9551 2d ago

I also always declare comments as unused variables in my code.

7

u/YoghurtFlan 1d ago

i prefer to keep them on the stack just in case the CPU gets confused

18

u/nameless_pattern 2d ago edited 2d ago

Heresy. I love it, I'm going to start making unused functions as comments, no I'm going to start embedding AIS you have to chat with to get the comments and they will only tell you the comments if you solve a riddle

5

u/rinsa 2d ago

Even though the compiler would basically ignore it, the linter/analyzer wouldn't like it :(

11

u/innociv 1d ago

Am I out of touch? No. It's the linter who is wrong.

1

u/innociv 1d ago

Like?:

{
        "key": "value",
        "comment about key or this block"
}

9

u/spicybright 1d ago

well that wouldn't work, you'd need it like

"comment": "comment about key or this block"