Posts Tagged access specifiers

C++ For C# Developers: Part 15 – Struct and Class Permissions

Tags: , , , , ,

Today we’ll cover the last major topic of structs in C++: how we control access to them. We’ll talk about access specifiers like private, the “friendship” concept, and finally get around to the details of const.

Read the rest of this article »

1 Comment

Better OOP Through Namespaces

Tags: , , ,

Namespaces may make poor function pointers, but you’d be wise to not write them off so quickly. It turns out that they have an altogether different usage that can help you blend the speed advantages of public fields with the encapsulation and information hiding of getters and setters. Read on to learn more about this lovely compromise.

Read the rest of this article »

8 Comments

Function Performance

Tags: , , , , ,

With access specifiers, statics, plain functions, and overriding, there are a lot of ways you can dress up a function in AS3. But how many programmers really know the performance implications of these options? Read on to find a straightforward test showing just that. EDIT: added functions defined in interfaces, getters, setters, and final functions.

Read the rest of this article »

48 Comments