<?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"
	>
<channel>
	<title>Comments on: ColdFusion Struct Literals Fail Again</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<pubDate>Fri, 21 Nov 2008 06:00:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: barneyb</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-107219</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Mon, 21 Jul 2008 15:59:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-107219</guid>
		<description>Elliot,

Having quoted keys would definitely be a nice feature.  Though even better would be allowing colons or equals signs for the key/value separator so you can use a colon like basically every other language.

On Railo, you can use struct/array literals as expressions, meaning you can use them in CFRETURN, as function/method arguments, or any where else.  The only-assignment restriction is a ColdFusion issue, not a CFML issue.  So people are implementing it correctly, just Adobe totally dropped the ball.</description>
		<content:encoded><![CDATA[<p>Elliot,</p>
<p>Having quoted keys would definitely be a nice feature.  Though even better would be allowing colons or equals signs for the key/value separator so you can use a colon like basically every other language.</p>
<p>On Railo, you can use struct/array literals as expressions, meaning you can use them in CFRETURN, as function/method arguments, or any where else.  The only-assignment restriction is a ColdFusion issue, not a CFML issue.  So people are implementing it correctly, just Adobe totally dropped the ball.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elliott Sprehn</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-107088</link>
		<dc:creator>Elliott Sprehn</dc:creator>
		<pubDate>Mon, 21 Jul 2008 08:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-107088</guid>
		<description>Also, for that matter, why can't we pass literals as attribute values or directly in function calls?All the above languages also support that.</description>
		<content:encoded><![CDATA[<p>Also, for that matter, why can't we pass literals as attribute values or directly in function calls?All the above languages also support that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elliott Sprehn</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-107086</link>
		<dc:creator>Elliott Sprehn</dc:creator>
		<pubDate>Mon, 21 Jul 2008 08:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-107086</guid>
		<description>Sigh, this does seem to be an extremely half baked feature. Hopefully once the CFML committee is up and running and there's a real standard for how the language should behave we'll be able to push Adobe to fix this stuff.

I'd really like to see allowing quoted strings in the name part.

{ "Something With Spaces" = [ "a", "b", "c" ] }

php, ruby, python, perl, groovy, javascript, as3 ... Everyone has literal notation like this now that allows quotes and proper nesting.

Why are we in the stone age? :/</description>
		<content:encoded><![CDATA[<p>Sigh, this does seem to be an extremely half baked feature. Hopefully once the CFML committee is up and running and there's a real standard for how the language should behave we'll be able to push Adobe to fix this stuff.</p>
<p>I'd really like to see allowing quoted strings in the name part.</p>
<p>{ "Something With Spaces" = [ "a", "b", "c" ] }</p>
<p>php, ruby, python, perl, groovy, javascript, as3 &#8230; Everyone has literal notation like this now that allows quotes and proper nesting.</p>
<p>Why are we in the stone age? :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105377</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Wed, 16 Jul 2008 01:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105377</guid>
		<description>Derik,

With CF 8.0.1, you can mix-and-match nested array and struct literals (e.g. [{id=1}, {id=2}]).  It was only disallowed in the initial 8.0 release.

Even more perplexing for the '=' decision is that both JavaScript, and named CFC/UDF parameters use the ':'.  The '=' is accepted for named CFC/UDF parameters, but not required.  To make it consistent with the existing language features, they should have at least allowed both.  I'd have preferred to only allow ':' and deprecate the '=' in CFC/UDF parameters, but oh well.</description>
		<content:encoded><![CDATA[<p>Derik,</p>
<p>With CF 8.0.1, you can mix-and-match nested array and struct literals (e.g. [{id=1}, {id=2}]).  It was only disallowed in the initial 8.0 release.</p>
<p>Even more perplexing for the '=' decision is that both JavaScript, and named CFC/UDF parameters use the ':'.  The '=' is accepted for named CFC/UDF parameters, but not required.  To make it consistent with the existing language features, they should have at least allowed both.  I'd have preferred to only allow ':' and deprecate the '=' in CFC/UDF parameters, but oh well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek P.</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105345</link>
		<dc:creator>Derek P.</dc:creator>
		<pubDate>Tue, 15 Jul 2008 23:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105345</guid>
		<description>I absolutely hate the "=" syntax, what were they thinking!? I imagine the thought process was "easier for developers to 'get'", but I still think its absolutely unconventional.

I wasn't aware you couldn't nest structs using literal syntax either, interesting.</description>
		<content:encoded><![CDATA[<p>I absolutely hate the "=" syntax, what were they thinking!? I imagine the thought process was "easier for developers to 'get'", but I still think its absolutely unconventional.</p>
<p>I wasn't aware you couldn't nest structs using literal syntax either, interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Corfield</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105307</link>
		<dc:creator>Sean Corfield</dc:creator>
		<pubDate>Tue, 15 Jul 2008 20:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105307</guid>
		<description>OK, that was completely unclear (to me). I didn't realize you were saying the first fragment didn't work! Yeah, then in that case, I agree that it's broken.</description>
		<content:encoded><![CDATA[<p>OK, that was completely unclear (to me). I didn't realize you were saying the first fragment didn't work! Yeah, then in that case, I agree that it's broken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105248</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Tue, 15 Jul 2008 15:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105248</guid>
		<description>Sean,

Joshua nailed it.

The third example is insane - it doesn't make any sense at all - and that's my point.  As near as I can tell, that represents how ColdFusion evaluates the first snippet, instead of doing it like the second snippet (which is correct).</description>
		<content:encoded><![CDATA[<p>Sean,</p>
<p>Joshua nailed it.</p>
<p>The third example is insane - it doesn't make any sense at all - and that's my point.  As near as I can tell, that represents how ColdFusion evaluates the first snippet, instead of doing it like the second snippet (which is correct).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Frankamp</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105131</link>
		<dc:creator>Joshua Frankamp</dc:creator>
		<pubDate>Tue, 15 Jul 2008 05:28:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105131</guid>
		<description>Sean,

It's about order of operations. The first fragment should be evaluated from the inside out, NOT the outside in. s should not be modified until the entire block has been evaluated. The third block looks strange because that is how CF8 decides to implement it. Just paste the first block into a test page on CF8 and think to yourself, why does this error?

Think of a duck typed use case, like barney's example. s could be called, animals for example. He has a simple list representation as a starting point, but decides to transform it into a complex structure and... oh lets say he's in a cfc function body. Why go to all the trouble to var yet another variable to represent the same data in a different form, we arn't going to need the list afterward... GONK.</description>
		<content:encoded><![CDATA[<p>Sean,</p>
<p>It's about order of operations. The first fragment should be evaluated from the inside out, NOT the outside in. s should not be modified until the entire block has been evaluated. The third block looks strange because that is how CF8 decides to implement it. Just paste the first block into a test page on CF8 and think to yourself, why does this error?</p>
<p>Think of a duck typed use case, like barney's example. s could be called, animals for example. He has a simple list representation as a starting point, but decides to transform it into a complex structure and&#8230; oh lets say he's in a cfc function body. Why go to all the trouble to var yet another variable to represent the same data in a different form, we arn't going to need the list afterward&#8230; GONK.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Corfield</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105119</link>
		<dc:creator>Sean Corfield</dc:creator>
		<pubDate>Tue, 15 Jul 2008 04:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105119</guid>
		<description>Barney, are you sure those code fragments are right? The third fragment seems to assign to s and then overwrite it with an empty struct. I'm not quite sure what point you're trying to make here. Could you clarify?</description>
		<content:encoded><![CDATA[<p>Barney, are you sure those code fragments are right? The third fragment seems to assign to s and then overwrite it with an empty struct. I'm not quite sure what point you're trying to make here. Could you clarify?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sami Hoda</title>
		<link>http://www.barneyb.com/barneyblog/2008/07/14/coldfusion-struct-literals-fail-again/#comment-105052</link>
		<dc:creator>Sami Hoda</dc:creator>
		<pubDate>Mon, 14 Jul 2008 22:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=442#comment-105052</guid>
		<description>Great to hear that. 

I think the wish list gets broadcast to the whole development team, which is both good and bad, because I'm not sure if any one person takes ownership of it. 

Waiting for the bug base as well. But, once the committees are setup, we can barrage members as well who are managing the specific area we find issues with.</description>
		<content:encoded><![CDATA[<p>Great to hear that. </p>
<p>I think the wish list gets broadcast to the whole development team, which is both good and bad, because I'm not sure if any one person takes ownership of it. </p>
<p>Waiting for the bug base as well. But, once the committees are setup, we can barrage members as well who are managing the specific area we find issues with.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
