I’m fond of writing things like
/*
A very simple HTML/XML entity-escape function--why isn’t this
part of the standard Java API?
*/
which involve less typing than
//
// A very simple HTML/XML entity-escape function--why isn’t this
// part of the standard Java API?
//
Also, the “block” form allows “interspersed” comments, where a short comment can be put in the middle of a line and followed by more program
text in the rest of the line. For example, as a way of keeping long
argument lists straight:
gdImageCopyResampled
(
/*dst =*/ ResizedFrame,
/*src =*/ Context.StillFrame,
/*dstX =*/ 0,
/*dstY =*/ 0,
/*srcX =*/ 0,
/*srcY =*/ 0,
/*dstW =*/ ResizedFrame->sx,
/*dstH =*/ ResizedFrame->sy,
/*srcW =*/ Context.StillFrame->sx,
/*srcH =*/ Context.StillFrame->sy
);
Do you feel the same?
A normal person won't compulsively comment very function argument,
Kaz Kylheku <643-408-1753@kylheku.com> writes:
A normal person won't compulsively comment very function argument,
Well, they might if they're generating documentation from the
comments.
Lowell Gilbert <lgusenet@be-well.ilk.org> writes:
Kaz Kylheku <643-408-1753@kylheku.com> writes:
A normal person won't compulsively comment very function argument,
Well, they might if they're generating documentation from the
comments.
The discussion was about function arguments in a call. Documentation
would, presumably, be generated from comments on (formal) parameters in
a function declaration.
Kaz Kylheku <643-408-1753@kylheku.com> writes:
A normal person won't compulsively comment very function argument,
Well, they might if they're generating documentation from the comments.
Even then, it would usually only be a concern for API-type functions,
which means a fairly small share of a typical codebase.
On 3/21/2024 2:19 AM, Lawrence D'Oliveiro wrote:
I’m fond of writing things like
/*
A very simple HTML/XML entity-escape function--why isn’t this part
of the standard Java API?
*/
which involve less typing than
//
// A very simple HTML/XML entity-escape function--why isn’t this
// part of the standard Java API?
//
Get yourself some Notepad++.
Highlight a block of comments and hit Ctrl + Q.
Get yourself some Notepad++.
DFS wrote:
Get yourself some Notepad++.
Not everybody can afford a machine powerful enough for a fancy text editor like that.
On 24.04.24 14:36, Blue-Maned_Hawk wrote:
DFS wrote:BULSHIT.
Get yourself some Notepad++.
Not everybody can afford a machine powerful enough for a fancy text
editor like that.
I run notepad++ on a 20 year old xp pro machine, and never had a
problem.
DFS wrote:
Get yourself some Notepad++.
Not everybody can afford a machine powerful enough for a fancy text editor like that.
On 4/24/2024 8:36 AM, Blue-Maned_Troll wrote:
DFS wrote:
Get yourself some Notepad++.
Not everybody can afford a machine powerful enough for a fancy text
editor like that.
Notepad++ will run on $25 dumpster hardware.
DFS wrote:
On 4/24/2024 8:36 AM, Blue-Maned_Troll wrote:
That's an unsubstantiated claim.
DFS wrote:
Get yourself some Notepad++.
Not everybody can afford a machine powerful enough for a fancy text
editor like that.
Notepad++ will run on $25 dumpster hardware.
So what? Not everybody can afford a machine that powerful.
DFS wrote:
On 4/24/2024 8:36 AM, Blue-Maned_Troll wrote:
That's an unsubstantiated claim.
DFS wrote:
Get yourself some Notepad++.
Not everybody can afford a machine powerful enough for a fancy text
editor like that.
Notepad++ will run on $25 dumpster hardware.
So what? Not everybody can afford a machine that powerful.
Since then, I’ve seen newer programmers gravitate towards the rest-of-line form in preference to the block form, and I’m not sure why. I’m fond of writing things like
/*
A very simple HTML/XML entity-escape function--why isn’t this
part of the standard Java API?
*/
which involve less typing than
//
// A very simple HTML/XML entity-escape function--why isn’t this
// part of the standard Java API?
//
Also, the “block” form allows “interspersed” comments, where a short comment can be put in the middle of a line and followed by more program
text in the rest of the line. For example, as a way of keeping long
argument lists straight:
gdImageCopyResampled
(
/*dst =*/ ResizedFrame,
/*src =*/ Context.StillFrame,
/*dstX =*/ 0,
/*dstY =*/ 0,
/*srcX =*/ 0,
/*srcY =*/ 0,
/*dstW =*/ ResizedFrame->sx,
/*dstH =*/ ResizedFrame->sy,
/*srcW =*/ Context.StillFrame->sx,
/*srcH =*/ Context.StillFrame->sy
);
I have a simpler approach: commits which introduced commented-out
code, whether with #if 0, or any other means, shall not be merged.
I don't perpetrate that in my open source projects, and "-1" such
submissions at work.
When someone wants to remove code, I encourage them to actually
delete it. The comment about why it was deleted goes into the
commit log.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 919 |
Nodes: | 10 (1 / 9) |
Uptime: | 53:44:19 |
Calls: | 12,183 |
Calls today: | 3 |
Files: | 186,524 |
Messages: | 2,236,291 |