Posts Tagged untyped

Should You Bother Giving Variables a Type?

Tags: , , ,

Many modern strongly-typed languages have introduced a way for you to not have to type a variable’s type. In C#, you can use var instead of the actual type. In C++, you use auto. AS3 has a similar feature with it’s “untyped” type: *. In those other languages, var and auto are syntax sugar that the compiler replaces with the actual type. Will the AS3 compiler and/or Flash Player do the same for us? Today’s article finds out if it’s safe to skip the type and just use *.

Read the rest of this article »

7 Comments

How Big Is That Class?

Tags: , , , , , , , ,

When you instantiate one of your classes, how much memory does it use? Today’s article tries out a lot of combinations and counts the bytes used. The conclusion is easy to remember and will give you a solid understanding of how much memory your app is using.

Read the rest of this article »

5 Comments

5x Faster For-In Loops

Tags: , , ,

I’ve recently been notified of a way to dramatically speed up for-in loops. I’ve tested this method out and indeed there is a 5x speedup. Employing the technique is also really easy. Unfortunately, the speedup is sometimes an illusion. Read on to learn a little more about for-in loops and how you could potentially speed yours up by 5x.

Read the rest of this article »

9 Comments