this post was submitted on 27 Feb 2025
373 points (97.7% liked)

Programmer Humor

20815 readers
1682 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 19 hours ago (1 children)

If you do that, you lose formatting and comments every time you load the source from disk

[–] [email protected] 3 points 17 hours ago* (last edited 17 hours ago) (1 children)

Losing formatting other than what you've set in your deparser would be the point. Losing comments would be bad, but that seems easily fixable just by giving each comment block a symbol that points to it's contents.

[–] [email protected] 3 points 14 hours ago (1 children)

Or by including comments in the parse tree. (& Yes, it is done various places for various languages and formats.)

[–] [email protected] 1 points 12 hours ago* (last edited 12 hours ago)

Do you have some examples?

(That is what I meant by giving them a symbol, maybe I worded it poorly)