Posts Tagged arguments

C++ For C# Developers: Part 27 – Template Deduction and Specialization

Tags: , , ,

Template deduction in C++ is like generic type parameter deduction in C#: it allows us to omit template arguments. Template specialization has no C# equivalent, but enables special-casing of templates based on certain arguments. Today we’ll look at how these features can make our code a lot less noisy and also a lot more efficient.

Read the rest of this article »

No Comments

Default Arguments

Tags: , , , , ,

I’ve talked about var args, the arguments keyword, and even the length of a function that has default arguments, but I’ve never written an article all about default arguments… until today.

Read the rest of this article »

11 Comments

Function Length

Tags: , , , , , ,

In my last article on getProperties, there was one strange finding in the tests of standard classes: the Function class seems to have a length field. What is it? Today we’ll see

Read the rest of this article »

4 Comments

Arguments Slowdown

Tags: , , ,

While I was working on last week’s article it became apparent that something strange was going on with the arguments keyword in AS3. Last week I showed that even after you’ve changed the parameters of a function, you can still get the original values by indexing into arguments. This implies a copy and a copy implies a slowdown. Read on to see if there really is a slowdown and, if there is, what kind of performance impact there is.

Read the rest of this article »

No Comments

Argument Clash

Tags: , , , ,

I am often burned by MXMLC: the AS3 compiler. When I am, I find this infuriating and look for the reason why this happened. Today I’ll tip you off about this problem and delve into what it means if you happen to trigger it.

Read the rest of this article »

No Comments

Reverse Currying

Tags: ,

As a followup to last week’s article on curry functions, today’s is about the reverse of currying.

Read the rest of this article »

2 Comments

Variable Clashes

Tags: , ,

Scoping is pretty weird in AS3 for those coming from C/C++ and Java. There are two cases in particular you should know about.

Read the rest of this article »

3 Comments