Code Comments Syntax

The cluster centers on discussions about comment syntax in programming languages, including preferences for line vs. block comments, proposals for machine-interpretable or semantic comments, and debates on whether comments should remain purely human-readable.

➡️ Stable 0.6x Programming Languages
2,511
Comments
20
Years Active
5
Top Authors
#578
Topic ID

Activity Over Time

2007
8
2008
17
2009
44
2010
52
2011
66
2012
130
2013
145
2014
124
2015
136
2016
136
2017
179
2018
104
2019
129
2020
185
2021
209
2022
190
2023
213
2024
224
2025
215
2026
5

Keywords

e.g QED PHP CC AI XML HN COMMENT i.e GCC comments comment syntax code clang comments like java tcl hello ast

Sample Comments

sitkack Sep 24, 2015 View on HN

The comment syntax is really what gets me.

im3w1l Sep 1, 2021 View on HN

Well we do have "comments" that are actually interpreted by tooling.

smegel Sep 1, 2016 View on HN

If by code you mean comments...

knome Oct 20, 2009 View on HN

By this syntax they aren't comments anymore.

Dewie3 May 11, 2015 View on HN

If you're feeling paranoid and don't have time to look up the set of magical incantations, maybe you should write your actual comments like this: // COMMENT we have to check that [...] :)

dogonwheels Mar 28, 2011 View on HN

I think the line_comments option might be some help.

floppydisc Sep 15, 2021 View on HN

Why is the slashdash comment style an incredible idea?

DonHopkins Feb 6, 2016 View on HN

Too bad the compiler doesn't raise a fatal error for comments like that.

_DeadFred_ Feb 26, 2025 View on HN

You need to add /s to comments like these or people might mistake you for a total tool.

bjourne Nov 23, 2025 View on HN

Line comments work pretty well for explanation storage. :) Almost every programming language support that feature.