Italic comment color

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

Should Italic be removed from the PHP comment syntax?

Poll ended at Sun Jan 07, 2007 4:08 pm

Yes
13
81%
No
3
19%
 
Total votes: 16

User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Weirdan wrote:Stylish
This is awesome.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I voted for the change the day this thread appeared :) I don't like italics (or underscores for that matter) in mono-spaced code.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

d11wtq wrote:I voted for the change the day this thread appeared :) I don't like italics (or underscores for that matter) in mono-spaced code.
Same here. Bold is okay provided it doesn't affect the dimensional requirements for the font thereby screwing up alignment, but other then that, colors only for myself personally. :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I could certainly do without the underlines or italics, and voted as such.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

okay, so there appears to be few nay votes.

Now, the color has also been brought up as something to possible change. So here's what we can do:
  1. I remove the italics without altering the color immediately
  2. We discuss colors for a while and then change the highlighting afterward
Please choose.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

I say change italics, let colour changes wait a short while. I don't really mind the lighter colouring, mainly because it lets the code stand out more - darker comments might actually reduce that level of readability.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Maugrim_The_Reaper wrote:I don't really mind the lighter colouring, mainly because it lets the code stand out more - darker comments might actually reduce that level of readability.
In my personal settings I often use a light gray (or green) for comments so they blend into the white background a bit.
possible example wrote:/**
* Open a stream
* \param[in] aDescriptor Supply a description that will allow the
* stream to be opened. What that specifically
* is will depend on the particular
* implementation.
* \note Default value is an empty string.
* \returns void
*/

public function Open($aDescriptor = '');
edit: I should note I'm not advocating changing all the colors, I just added more for some contrast.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I don't mind the orange for comments. Right now I use orange for single line comments and light gray for multi-line comments (in Eclipse). In notepad++ I use orange and green. just about any light colored, non obtrusive color that is not part of the 'action' colors is OK with me. But getting rid of the italics is a good way to go and would advocate that immediately.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

I prefer orange because it stands out. Sometimes I'll be scrolling through a couple thousand of lines of code and be thanking jesus when I see that heavenly orange text.
stylish wrote:User styles empower your browsing experience by letting you fix ugly sites
rofl!
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Thought it would be useful to have a visual comparison:

Current style:

Code: Select all

// php-defined functions are red
$row = MySQL_fetch_assoc($result);

$quoted_text = 'hot pink, baby!';

// user functions are whatever this color is:
function userFunction($arg1=NULL,$arg2='bob'){
	$someVar = $arg1?$arg1:$arg2;
	if($something){
		// do something
	}else(
		// don't	
		
		// control structures are blue
		return(false);
	)
	foreach($something as $key => $val){
		/*	
			iterate 
			the 
			array 
		*/
	}
	echo '<a href="#">all done here, '.$username.'</a>';
	exit;
}
New style?
// php-defined functions are red
$row = MySQL_fetch_assoc($result);

$quoted_text = 'hot pink, baby!';

// user functions are whatever this color is:
function userFunction($arg1=NULL,$arg2='bob'){
$someVar = $arg1?$arg1:$arg2;
if($something){
// do something
}else(
// don't

// control structures are blue
return(false);
)
foreach($something as $key => $val){
/*
iterate
the
array
*/

}
echo '<a href="#">all done here, '.$username.'</a>';
exit;
}
I wish I could simulate proper indenting (which I'd personally like to see reduced a little) Let me know what you guys think?
Last edited by Kieran Huggins on Wed Jan 10, 2007 1:09 pm, edited 4 times in total.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Hmm yes judging by the responses and being personally unsure of even my own opinion where colour is concerned I'd say leave it as is.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Kieran Huggins wrote:New style?
// php-defined functions are red
$row = MySQL_fetch_assoc($result);

$quoted_text = 'hot pink, baby!';

// user functions are whatever this color is:
function userFunction($arg1=NULL,$arg2='bob'){
$someVar = $arg1?$arg1:$arg2;
if($something){
// do something
}else(
// don't

// control structures are blue
return(false);
)
foreach($something as $key => $val){
/*
iterate
the
array
*/

}
echo '<a href="#">all done here, '.$username.'</a>';
exit;
}
I wish I could simulate proper indenting (which I'd personally like to see reduced a little) Let me know what you guys think?
I'm not sure I'm a fan of ... pastel. :)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I find the $ having the same color as keywords but the variable name another a bit distracting ...and second
feyd wrote:I'm not sure I'm a fan of ... pastel.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't think it's even possible for us to segregate the $ form the variable name (especially to it's own color) within the highlighter.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

It's not necessary for the $ to be a different color.

Also, I'd be more than happy to hack away at a the code highlighter on your behalf.
Post Reply