Comment terminology
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Comment terminology
Haven't been here for ages. Hi everyone! I've got a terminology question:
When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?
Uncommented isn't quite the same. Active?
It's definitely not commented in.
When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?
Uncommented isn't quite the same. Active?
It's definitely not commented in.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Comment terminology
Non-commented lines of code are commonly refered to as SLOC (source lines of code).
Comments and white space are not source code...
Comments and white space are not source code...
Re: Comment terminology
I'd say executable/non-executable lines. Unreachable code (usually referred to as dead code) is effectively commented as well
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Comment terminology
Uh ... maybe I am missing something, but isn't code that is not commented out called ... code.Ollie Saunders wrote:When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?
(#10850)
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Comment terminology
I think he thought thatarborint wrote:Uh ... maybe I am missing something, but isn't code that is not commented out called ... code.Ollie Saunders wrote:When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?
Code: Select all
// $commented_code = true;I'm not sure if I agree with such terms, but it seems that's what he meant.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Comment terminology
I defined a new term to get around the problem.
Commented-out-code is now code-under-comment.
Comments removed that were formally commenting out code is now code-not-under-comment.
Commented-out-code is now code-under-comment.
Comments removed that were formally commenting out code is now code-not-under-comment.
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Comment terminology
So, basically you are asking for a term that explains a block of arbitrary data which being uncommented is valid code?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Comment terminology
That's not how I intended to be interpreted. At this stage I'm not asking anything and what I'm talking about is moving from toI wanted names for both these things. But I've done it now so we're done here. Go back to your lives.
Code: Select all
//code();Code: Select all
code();- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Comment terminology
If you come up with a more formal definition of code-not-under-comment I'd like to know, too.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Comment terminology
A friend of mine suggested "statemented in".
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Comment terminology
Again I say, this is a comment (or commented out code):And this is just code:
There is a saying that there is no name for someone who does not collect stamps. 
Code: Select all
//code();Code: Select all
code();(#10850)
Re: Comment terminology
I may be off-base, but I believe "commented code" is simply a "comment" where non-commented code, is simply "code". That's what I use, anyway. Source Code, or Source Lines of Code are simply more specific ways of saying "Code" and "Commented Code" is just a specific way of saying "Content"... maybe even a specific way of saying "A comment of something that used to be or could be working code", but again, if it's not commented, and executes or is interpreted by a parser in any way, server side or client side, I believe, functionally, it is simply "Code".

- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Comment terminology
Actually, I've been wondering that if I have this:
is that code? Note, it does not work (; missing), but does that make it still code? If so, then I would definitely agree with
Code: Select all
$var = 'something'Otherwise there could be a more precise term.omniuni wrote:if it's not commented, and executes or is interpreted by a parser in any way, server side or client side, I believe, functionally, it is simply "Code".
Re: Comment terminology
Yeah, I'd still call it code. "Bad Code" or "Wrong Code" or "Erroneous Code" yes, but still, it's code because it will be parsed and then it will DO something. In this case throw an error. If you add the semicolon, it will reserve a bit of memory and store a value.