Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Lethal amount of fail approaching

Name: Anonymous 2008-06-24 12:26

http://www.mathgladiator.com/projects/kira/

Kira is a programming language that compiles to PHP. PHP is the best platform for web applications, but the language operating the platform is out-dated for a modern world. In fact, the PHP language sucks. Kira is designed to bring a good language and modern techniques into play whilst taking advantage of all existing PHP and a massive army of PHP developers.
Input:

int[] imap(int[] a, int->int f)
{
    int[] b;
    for(int k = 0; k < a.length; k++)
    {
        b[k] = f(a[k]);
    }
    return b;
}


unit main()
{
    int[] a = [1,2,3,4,5];
    print a;
    int->int f = function int (int x)
    {
        return x*x;
    };
    print imap(a,f);
}


Output:

function demo_NS_imap($a,$f)
{
for($k=0;$k<count($a);$k++)
{
$b[$k]=_I_($f)->Ev($a[$k]);
}
return $b;
}
class funptr_demo_NS_imap
{
    public function Ev($a,$f)
    {
        return demo_NS_imap($a,$f);
    }
}
function Anony_demo_0_Fun($Hid,$x)
{
{
return $x*$x;
}
}
class Closure_Anony_demo_0_Fun
{
    public $_Hidden;
    public function Ev($x)
    {
        return Anony_demo_0_Fun($this->_Hidden,$x);
    }
    public function __construct($h)
    {
        $this->_Hidden = $h;
    }
}
function main()
{
$a=array(0=>1,1=>2,2=>3,3=>4,4=>5);
print_r($a);
$f=new Closure_Anony_demo_0_Fun(array());
print_r(demo_NS_imap($a,$f));
}

Name: Anonymous 2008-06-26 14:29


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List