Compiler - Part #1

About the language

Program Main()


using System;

namespace ZeckLyn
{
    internal class Program
    {
        function Main(string[] args) -> void // default:  void
        {
              let n = "old"; // string
              var i = "car"; // string            
              i = 's'; // new char         
              i = 255; // new int
              i = 3.1415; // new double
              i = 3.1415f; // new float
              print(typeof(var)); // not               
              print(typeof(let)); // not           
              print(typeof(string)); // string 
        }
    }
}

UTF8 string, so a char is a unicode (int)


// static string literal (not creating any GC object)
let mystr = "mystring" ;

mystr[1]  // indexers

let mystr3 = new string("string heap")