# Theory | Type Systems

<figure><img src="https://3631540137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN446vsAcgRhUQmWQjww9%2Fuploads%2FKsMWcNYmZZqM1WoQMzqC%2FScreenshot%20from%202023-06-03%2021-39-15.png?alt=media&#x26;token=4950ef75-026e-4adf-8d7c-fa3cf8edfe67" alt=""><figcaption><p>Broken Experimental Nightly Type System</p></figcaption></figure>

SkyLine aims to be a compiled programming language while also being interpreted, what do we mean by that? Well, SkyLine is not machine code compiled but plans to allow users to select specific ways of executing code which can include through regex, byte code compilation or even standard evaluation; similar to the Perl programming language. With this, comes quite the wacky syntax and the wacky type system.

Because SkyLine aims to act like a machine code compiled language, it does so by taking advantage of multiple sets of data types. Take a programming language like python for example that uses Integer, String, Boolean, Float and what they consider to be a "byte" data type. SkyLine takes a different twist and allows you to directly use Integer8, Integer16, Integer32, Integer64, Boolean, String etc data types that can make the language much more robust. While most programming language's will auto pick and choose the size's of the value, SkyLine will do something similar but fit it into a direct data type and class based on that data.&#x20;

> The Weirdness within SkyLine | Postfix operations

When it comes to the type system in SkyLine, it can become a bit wacky at times but this is for specific reasons. SkyLine will select the data type of a value based on its size in the case of integer's of course and even allows you to manipulate specific values in ways you might not exactly understand. This is done simply for the idea of simplicity and convenience which oddly enough can come in handy. <br>

For example, when you look at most programming language's, postifx operations (--, ++) are used for integers, in SkyLine; it can be used for most data types.&#x20;

```cilkcpp
set xval := int(10);
set yval := true;
set name := "hello!";
set Arrv := [10, 20, 30];

xval--
yval--
name--
Arrv--

println(xval, yval, name, Arrv)

```

Looking at this code you may be quite confused, but given the type system within SkyLine and how flexible it can be, all of this code is completely valid! The result of these operations look like the following.

<figure><img src="https://3631540137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN446vsAcgRhUQmWQjww9%2Fuploads%2F0GvRxLlCaiR65lpAVQDm%2FScreenshot%20from%202023-06-03%2021-58-25.png?alt=media&#x26;token=e389edb5-650b-486c-b54a-e4bc739f984e" alt=""><figcaption></figcaption></figure>

The easy way to remember this is like the following&#x20;

* Integer-- : Subtracts one ( standard postfix -- operation )
* Boolean--: if true makes it false&#x20;
* String--: Takes one from the string length
* Array--: Pops the right most value of the array.

By all means, standard computer science says this is a no no, but SkyLine was built by people who are not fond of rules (security researchers and game cheaters). That being said, we just chose to throw that in their with it as well.

> Object Invoke's&#x20;

In SkyLine everything is an object, with each object comes a way to invoke calls! Invokes within SkyLine all change based on their type like every or most programming language's out there. Each data type has its own set which consist of the following.\ <br>
