<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: as3 coding style: curly braces in flex builder</title>
	<atom:link href="http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/feed" rel="self" type="application/rss+xml" />
	<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder</link>
	<description>technology, politics, armchair philosophy</description>
	<lastBuildDate>Tue, 19 Jan 2010 13:36:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Neil Buchan</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-9955</link>
		<dc:creator>Neil Buchan</dc:creator>
		<pubDate>Mon, 16 Nov 2009 16:39:02 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-9955</guid>
		<description>I prefer the same line opening braces. I can get more readable code on the screen at one time. If one were so inclined, one could argue that it might even help save the planet using less paper when printed.

Great entry here though:

http://en.wikipedia.org/wiki/Indent_style
This will only serve to confuse the undecided.

Sun declared that Java should be typed with opening braces on the same line.</description>
		<content:encoded><![CDATA[<p>I prefer the same line opening braces. I can get more readable code on the screen at one time. If one were so inclined, one could argue that it might even help save the planet using less paper when printed.</p>
<p>Great entry here though:</p>
<p><a href="http://en.wikipedia.org/wiki/Indent_style" rel="nofollow">http://en.wikipedia.org/wiki/Indent_style</a><br />
This will only serve to confuse the undecided.</p>
<p>Sun declared that Java should be typed with opening braces on the same line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vbano</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-5467</link>
		<dc:creator>vbano</dc:creator>
		<pubDate>Thu, 19 Mar 2009 17:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-5467</guid>
		<description>Chad presents a very good argument for using a separate line. (It provides flexibility for multiple lines in the function line itself.)

Kaleb Wyman argues that the IDE provides the highlighting for the starting bracket (making the separate line to mark the construct unnecessary). However, the developer is not the only one who reads the code. When I review someone&#039;s code on our project (many files are over 100000 lines long), sometimes it is a comparison review. I review what has changed using differencing software (such as kdiff3). This has no highlighting feature for braces.

The extra line for the brace is worth the space. Vertical space issues can be mitigated somewhat by a coding convention. This is to place a comment after the closing bracket to indicate the context of the opening bracket as shown below. Often they are not on the same screen. When used especially for long functions and classes, I find this a time saver.

Starting Class_function_whatever
{
â€¦
}// Class_function_whatever [several screen pages down]</description>
		<content:encoded><![CDATA[<p>Chad presents a very good argument for using a separate line. (It provides flexibility for multiple lines in the function line itself.)</p>
<p>Kaleb Wyman argues that the IDE provides the highlighting for the starting bracket (making the separate line to mark the construct unnecessary). However, the developer is not the only one who reads the code. When I review someone&#8217;s code on our project (many files are over 100000 lines long), sometimes it is a comparison review. I review what has changed using differencing software (such as kdiff3). This has no highlighting feature for braces.</p>
<p>The extra line for the brace is worth the space. Vertical space issues can be mitigated somewhat by a coding convention. This is to place a comment after the closing bracket to indicate the context of the opening bracket as shown below. Often they are not on the same screen. When used especially for long functions and classes, I find this a time saver.</p>
<p>Starting Class_function_whatever<br />
{<br />
â€¦<br />
}// Class_function_whatever [several screen pages down]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olivier</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-2528</link>
		<dc:creator>Olivier</dc:creator>
		<pubDate>Sat, 08 Nov 2008 14:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-2528</guid>
		<description>Its on the next line because that actually IS better for the code, also, if you look around several languages, you&#039;ll notice the bigger part of them (that uses those braces anyway) want you to put the brace on the next line, and still allow you to do both (as does flex afaik)</description>
		<content:encoded><![CDATA[<p>Its on the next line because that actually IS better for the code, also, if you look around several languages, you&#8217;ll notice the bigger part of them (that uses those braces anyway) want you to put the brace on the next line, and still allow you to do both (as does flex afaik)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaleb Wyman</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-2102</link>
		<dc:creator>Kaleb Wyman</dc:creator>
		<pubDate>Wed, 15 Oct 2008 16:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-2102</guid>
		<description>If you put the caret of the Eclipse SDK (Flex Builder 2) on the right of your opening brace {&#124; it automatically highlights the closing brace {, and you can also click the - &amp; + symbol in the gutter to collapse a set of braces... so I think the &quot;visually aligned&quot; argument is a total wash. It makes coding no easier in my opinion, and I too believe it adds too many unnecessary lines of code.

I do not prefer braces on a new line, but Eclipse forces me to &quot;correct&quot; it twice every time I create a new class. I have not found a preference to force it to follow my own preferred brace wrapping conventions in Flex Builder 2 (2.0.155577). I would love to know if this is possible in this version of Flex Builder 2.

@YAOMK... what version are you using?</description>
		<content:encoded><![CDATA[<p>If you put the caret of the Eclipse SDK (Flex Builder 2) on the right of your opening brace {| it automatically highlights the closing brace {, and you can also click the &#8211; &amp; + symbol in the gutter to collapse a set of braces&#8230; so I think the &#8220;visually aligned&#8221; argument is a total wash. It makes coding no easier in my opinion, and I too believe it adds too many unnecessary lines of code.</p>
<p>I do not prefer braces on a new line, but Eclipse forces me to &#8220;correct&#8221; it twice every time I create a new class. I have not found a preference to force it to follow my own preferred brace wrapping conventions in Flex Builder 2 (2.0.155577). I would love to know if this is possible in this version of Flex Builder 2.</p>
<p>@YAOMK&#8230; what version are you using?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: YAOMK</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-569</link>
		<dc:creator>YAOMK</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-569</guid>
		<description>I also prefer the new line approach, but I just played around creating a class in Flex builder, I then formated it to use the inline syntax and proceeded to delete my ActionScript project and created a new one by the same name, to my surprise Flex retained my preference and used the inline syntax. Looks like we underestimated Flex all along lol.</description>
		<content:encoded><![CDATA[<p>I also prefer the new line approach, but I just played around creating a class in Flex builder, I then formated it to use the inline syntax and proceeded to delete my ActionScript project and created a new one by the same name, to my surprise Flex retained my preference and used the inline syntax. Looks like we underestimated Flex all along lol.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: infocom</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-386</link>
		<dc:creator>infocom</dc:creator>
		<pubDate>Tue, 06 May 2008 23:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-386</guid>
		<description>Curly braces on new lines make matching opening and closing braces easier. This allows you to easily find functions, for loops, etc. One of the worst things I find when editing other peoples code is finding where functions, for loops etc. begin and end.</description>
		<content:encoded><![CDATA[<p>Curly braces on new lines make matching opening and closing braces easier. This allows you to easily find functions, for loops, etc. One of the worst things I find when editing other peoples code is finding where functions, for loops etc. begin and end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Holmes</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-312</link>
		<dc:creator>Brian Holmes</dc:creator>
		<pubDate>Fri, 18 Apr 2008 16:34:39 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-312</guid>
		<description>While I prefer the adobe convention you can always uncheck Automatically Insert Closing Braces found at
Preferences &gt; Flex &gt; Editors &gt; Action Script Code. It doesn&#039;t automatically format your brackets the way you want, but you won&#039;t be modifying your functions as you go. It might be a good alternative for the time being?</description>
		<content:encoded><![CDATA[<p>While I prefer the adobe convention you can always uncheck Automatically Insert Closing Braces found at<br />
Preferences &gt; Flex &gt; Editors &gt; Action Script Code. It doesn&#8217;t automatically format your brackets the way you want, but you won&#8217;t be modifying your functions as you go. It might be a good alternative for the time being?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-311</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 18 Apr 2008 15:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-311</guid>
		<description>I too liked this approach for about 8 year of coding
foo(){
   // 
}

I then worked at a job where I had to conform to this approach.

foo()
{
   //
}

After a week or so whining about it I got used to it and actually no prefer it over the other style.  The biggest thing that I like about it is that it is very easy to visually match up the starting &#039;{&#039; and ending &#039;}&#039;.

As far as more white space in the code and more scrolling - I actually use the Outline mode and the ctrl-o shortcut to navigate around my class files, so that issue does not bother me too much.

I hope FB gets the bug fixed you mentioned. 

--jason</description>
		<content:encoded><![CDATA[<p>I too liked this approach for about 8 year of coding<br />
foo(){<br />
   //<br />
}</p>
<p>I then worked at a job where I had to conform to this approach.</p>
<p>foo()<br />
{<br />
   //<br />
}</p>
<p>After a week or so whining about it I got used to it and actually no prefer it over the other style.  The biggest thing that I like about it is that it is very easy to visually match up the starting &#8216;{&#8216; and ending &#8216;}&#8217;.</p>
<p>As far as more white space in the code and more scrolling &#8211; I actually use the Outline mode and the ctrl-o shortcut to navigate around my class files, so that issue does not bother me too much.</p>
<p>I hope FB gets the bug fixed you mentioned. </p>
<p>&#8211;jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chad</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-310</link>
		<dc:creator>chad</dc:creator>
		<pubDate>Fri, 18 Apr 2008 14:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-310</guid>
		<description>I myself struggled with this question.  I had always been a fan of using the least amount of lines possible.  After a series of revelations I had a change of heart.  In particular, I now prefer to have the curly brace on a separate line.  Why?  When you are writing a function that takes so many parameters that keeping them on one line causes the text to start creeping off the screen, at some point you wrap that line to the next line, or multiple lines.  When doing so, and keeping the curly brace on the same line, the function ends up looking a bit confusing.  The multi-line parameters list can look like lines of code for the function.  Therefor, I now always keep my curly brace on a fresh line.  Not only for functions, but any block of code that uses curly braces.

I agree with you that you should be able to change that default behavior (there really isn&#039;t a setting for that?), but thought I should offer my opinion.</description>
		<content:encoded><![CDATA[<p>I myself struggled with this question.  I had always been a fan of using the least amount of lines possible.  After a series of revelations I had a change of heart.  In particular, I now prefer to have the curly brace on a separate line.  Why?  When you are writing a function that takes so many parameters that keeping them on one line causes the text to start creeping off the screen, at some point you wrap that line to the next line, or multiple lines.  When doing so, and keeping the curly brace on the same line, the function ends up looking a bit confusing.  The multi-line parameters list can look like lines of code for the function.  Therefor, I now always keep my curly brace on a fresh line.  Not only for functions, but any block of code that uses curly braces.</p>
<p>I agree with you that you should be able to change that default behavior (there really isn&#8217;t a setting for that?), but thought I should offer my opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Platte</title>
		<link>http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder/comment-page-1#comment-309</link>
		<dc:creator>Matt Platte</dc:creator>
		<pubDate>Fri, 18 Apr 2008 13:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://joshua.almirun.com/tech/ria/flash/as3-coding-style-curly-braces-in-flex-builder#comment-309</guid>
		<description>When you find out what/where to change the templates (or whatever Eclipse/FB uses) be sure to write about it.  I, too, am well and mighty tired of editing every left curly brace I see.</description>
		<content:encoded><![CDATA[<p>When you find out what/where to change the templates (or whatever Eclipse/FB uses) be sure to write about it.  I, too, am well and mighty tired of editing every left curly brace I see.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
