(from Neko list)

Hi Nicolas et al.
I've just read up on haXe and I'm impressed. The feature set is great. It looks as if some features are inspired by functional languages. Enumerations and switches, for example, resemble the functional datatype and pattern matching and the nice aspect that you can ensure all patterns are handled. Type parameters and constructors are sweet. You've helped the community a lot. This is just what web developers need. Type-safety and interoperability.

Hi Bent,

Although some Neko/haXe interoperability questions might be suitable for the Neko list I think it would be better if you post on the haXe list. I'm forwarding this answer as well there so it will be kept in the archives.

I have two questions though.
First. Is it possible that there will be something like Java's static import in the future? Math.bla gets boring fast. :)

Not planed right now.

Second. Is it possible to qualify an enumeration constructor? E.g. if you have enum A {
    X; Z;
}
enum B {
    X; Z;
}
Then what?

First all identifiers must be lowercase so you'll have :

enum A { x; z; }
enum B { x; z; }

then "x" and "z" are of type B, but you can still refer explicitly to A.x or B.z which will disambigous the cases. Also, in a "switch", if the type matched is A you can directly use "x" and "z" even if they don't have priority in current scope.

Anyway, I'm going to experiment with it as I regularly use both js and as...

JS generator is not yet ready, will be done by next month.

Best,

Nicolas

---
Neko : One VM to run them all

Reply via email to