Skip to content

Instantly share code, notes, and snippets.

@DeadWisdom
Created October 11, 2013 08:21
Show Gist options
  • Save DeadWisdom/6931381 to your computer and use it in GitHub Desktop.
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.
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