Rip's Domain

CF 8.01 implicit creation bug still exists. I knew it!

Posted in ColdFusion by rip747 on April 4, 2008

As much as people think I’m a jerk, I’m a jerk for a good reason. I’m not afraid to stir the pot or call people out and I expect them to do the same to me.

Back on Feb 29, Ben Forta posted an entry to his blog about how the updater that was to be released for CF8 would fix the nesting problems that implicit creation had. If you haven’t already done so, take a minute to read the posting and the comments.

If you read through the comments, it was asked by Hansjoerg if the updater would fix the implicit creation problem where you couldn’t directly pass an implicitly created array or structure to a function. I noticed that 5 days went by with no answer, so I reiterated the question and again, got no answer from Ben. At this point something told me that it wouldn’t be fixed.

Today the updater was released and I ran to download and try it out. I hoping that I would be made a jerk of and the function call bug would be fixed…. it’s not.

Here is the function I used for testing:

<cffunction name=”testing” access=”public” returntype=”void” output=”true”>
<cfargument name=”a” type=”struct” required=”false” default=”#structnew()#”>
<cfdump var=”#arguments.a#” label=”argument”>
</cffunction>

Pretty simple. It just takes a structure as an argument and then dumps the contents to the screen. With this in hand I tried the implicit creation.

First off, implicitly creating the structure as a variable and then passing it into the function:

<cfset s = {a=4, b=[1,2,3,4]}>
<cfset testing(s)>

Hey it works! But I figured that it would. So now the really issue at hand, passing an implicitly created structure directly to the function:

<cfset testing({a=4, b=[1,2,3,4]})>

It failed.

Hell I even tried:

<cfset testing(#{a=4, b=[1,2,3,4]}#)>

and

<cfset testing(“#{a=4, b=[1,2,3,4]}#”)>

just for kicks. They all failed… the bug still exists.

This is what pisses me off, every other language out there allows you to do this, but you can’t do it in CF. We try to bring this to the attention of Ben Forta ( our evangelist, you know the guy who’s suppose to listen to us and address our concerns) and even directly to Adobe by submitting a bug report (thanks to Ben Nadel) and still we’re ignored.

I would rather have had Ben and / or Adobe tell me flat out that this issue wasn’t going to be resolved in this updater, then just ignore the question all together like they did.

I guess we’ll just have to wait for CF9 to see if this gets fixed or not?

2 Responses

Subscribe to comments with RSS.

  1. Hemant said, on April 5, 2008 at 3:24 am

    Hi,

    Passing struct to a function is not yet supported. It is something that is being worked on priority for next release. In Gemini, since the primary focus was 64-bit, we could only support nesting, but not function passing.

    Feel free to use http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    to report any issues or enhancements to us.

    Thanks,
    Hemant

  2. rip747 said, on April 8, 2008 at 11:39 am

    @Hemant,

    no offense hemant, but that is one lame ass excuse. i don’t get why you would focus your efforts on adding a feature when you needed to fix one. then again, this is how CF has been developed for years.

    btw, nesting doesn’t support quotes around the keys so you can’t use spaces in the key name:

    <cfset a = {“a”=1,”b”=2}

    will fail.

    you guys should really reconsider fixing in the next hotfix.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: