Skip to content

chklauser/prx

Repository files navigation

Prexonite Script

function main() {
  println("Hello World");
}

Another implementation of JavaScript? No, much much worse:

function flipperize(xs) = 
  xs 
    >> where(? is not null) 
    >> map(x => if(x mod 2 == 0) "flip" 
                            else "flop");

That, and tons of meta-programming1 await you in this dynamically typed2, somewhat object-aware3, interpreted4 abomination of a scripting language.

Footnotes

  1.   In it's most unsafe and raw form: Imagine macros, which to the untrained eye look exactly like functions, that produce arbitrary AST nodes to be spliced into their callsites. Or format your hard drive. And then crash the compiler.
  2.  I guess you could make the argument that the type system in Prexonite Script is actually highly advanced by being able to deal with dependent types. In case you're into that kind of thing. Then again, that is usually not very impressive in dynamically typed settings.
  3.  Yes, that's a thing. Prexonite Script allows you to consume objects, methods, properties, index accessors, etc. but there is no way to define classes or even prototypes, like with JavaScript. Having said that, there are ways to define custom constructors that return "objects", however, looking for .prototype will be in vain.
  4.  Technically speaking, Prexonite Script is actually being compiled. Three times. A significant portion of Prexonite code runs as x86, directly on your CPU. But wait until you hear the best part: It doesn't matter since most performance is wasted on insisting that every method invocation must do a full overload resolution. You know, in case those pesky methods swapped places since the last loop iteration.

About

Prexonite, a .NET hosted scripting language with a focus on meta-programming and embedded DSLs

Resources

License

Stars

Watchers

Forks

Packages 3