Pointers and references

Apart from objects in-place (like in C++, or structs in C#) there are pointers and references in Skila. Pointers behave like pointers in C++, but references are just like pointers with one exception — they cannot be null. In C++ once you assigned reference, it couldn’t be change, so it was more like a alias to object. In Skila it can be reassigned, but one thing you cannot do is this:

my_ref = null.MyClass;

Note: nulls will be typed in Skila (there is no just null).

Tagged

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: