Last active
August 29, 2015 13:57
-
-
Save Porges/9682743 to your computer and use it in GitHub Desktop.
iteration 1 of experimental_syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Tuple`2[System.Int32,System.Int32] | |
System.Tuple`1[System.Int32] | |
hello, foo: 2 - (1, 2), (1), (1, hello) | |
4294967295 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
class Program | |
{ | |
class Foo | |
{ | |
public int x; | |
public int y; | |
} | |
static (int, string) make_a_tuple() | |
{ | |
return (1, "hello"); | |
} | |
public static void Main() | |
{ | |
var foo = new Foo { x = 1 }; | |
foo { x = 2 }; | |
var x = (1,2); | |
var y = (1,); | |
Console.WriteLine(x.GetType()); | |
Console.WriteLine(y.GetType()); | |
Console.WriteLine("hello, foo: {0} - {1}, {2}, {3}", foo.x, x, y, make_a_tuple()); | |
uint n = 0b11111111111111111111111111111111; | |
Console.WriteLine(n); | |
var haha = new List<Tuple<int,string>>(); // todo: tokenizer needs changing for List<(int, string)> | |
haha.Add(make_a_tuple()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment