Created
October 11, 2013 08:21
-
-
Save DeadWisdom/6931381 to your computer and use it in GitHub Desktop.
A mythical language that features heavy type-inference and no templating, cause templating sucks, yo.
This file contains hidden or 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
import "stdio.h" | |
class Object { | |
@collected; | |
int x = 1; | |
float y = 2.0; | |
void init(self, x, *args) { | |
self.x = x; | |
super(self, x, *args); | |
} | |
} | |
class Thing { | |
@extends(Object); | |
@to int (self) { | |
return self.x; | |
} | |
@from int (cls, x) { | |
return cls(x); | |
} | |
} | |
class Array { | |
} | |
type inference; | |
def main() { | |
var obj = Object; | |
var x = (); []; {}; | |
var x = int[1, 2, 3, 4]; | |
var x = Array[1, 2, 3, 4]; | |
printf('a line'); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment