Here's one of the category "how come I didn't know this?". At least that was the case for, I guess I have been living under a stone.
Consider this code snippet in AS3:
Neat, I know. But I haven't known for long (it took Tink's code for me to notice).
Consider this code snippet in AS3:
var i:int = 123;
var foo:String = "foo";
var wtf:Object = {prop:"rad"};
trace(i, foo, wtf);
What happens when you compile this and watch the Output window or Console? I thought it'd fall over, but in fact you get var foo:String = "foo";
var wtf:Object = {prop:"rad"};
trace(i, foo, wtf);
123 foo [object Object]
Neat, I know. But I haven't known for long (it took Tink's code for me to notice).


Reminds me of when I used Flash 5 for two years before discovering the animation easing feature.
I always wrap them as an array:
trace([i,foo,wtf]);
Didn't knew that either..
like this:
package com.mysite.appname
{
import flash.utils.getQualifiedClassName;
public class TestTrace
{
public function TestTrace()
{
var i:int = 123;
var foo:String = "foo";
var wtf:Object = {prop:"rad"};
trace( getQualifiedClassName( this ), i, foo, wtf );
// com.mysite.appname::TestTrace 123 foo [object Object]
}
}
}
var example:TestTrace = new TestTrace();