this post was submitted on 28 Mar 2024
615 points (98.1% liked)

Programmer Humor

32596 readers
985 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] MachineFab812@discuss.tchncs.de 1 points 8 months ago (1 children)

When the variable name is the description that should be in the comments.

Idea: Comments that automattically populate the end of any line a given variable is invoked on, including spelling out formulas from that line. ie: float y=mx+b // (cartesian y value)=(slope)(cartesian x value)+(cartisian y-intercept)

"Duplicated" coments not actually in the file, but specified witt the creation of such variables and spread around by the code editor /IDE.

[โ€“] paholg@lemm.ee 4 points 8 months ago

Then, you could take those comments, and have the compiler use them to ensure you're using the right variable in the right place. Oh wait, we just invented a type system.