Hi to you all,

Neko looks like a very promissing project for dynamic languages.
I'm impressed with the speed at which it is being developped, the size of
the vm and the (unoptimized) speed of execution.

I just stumbled upon www.nekovm.org and a couple of questions came up.

* Does neko (or nekoml) support generators like python (http://www.python.org),
Boo (http://boo.codehaus.org) or .NET 2.0? I looked through the neko
documentation and found it fairly complete in functionality but I missed the
generator functionality, which I find a very usefull addition to programming. It
is a construction that makes lazy loading very easy and it mostly used in
iterator pattern ("for a in b"). A generator type would be nice.

For example a generator in Boo:

def myGenerator(x):
    x += 1
    yield x  //return x, but next call will continue here
    x += 10
    yield x

for a in MyGenerator(3):
    print a

would print "4" and "14"

In Neko it could be something like.
var gen = generator(x){
  x += 1;
  yield x;
  x += 10;
  yield x;
}

while(gen.next()){ //or $next(gen)
  a = gen.value;   //or $value(gen)
  $print(a);
}

* Unicode: most current programming languages use a unicode string
representation. I'm not sure about this, but Neko seems to have a single byte
string representation, but with support for UTF8. Is it wise to stick to the
(old fashioned?) single byte representation?

* Benchmarking. Since it is/will be an issue for the adoptation of neko, it is
nice to implement some of the benchmarks of the computer language shootout
(http://shootout.alioth.debian.org/) and apply for an entry in this shootout.

Cheers,

Edwin

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to