[evolution] Request for comments: new sys APIs

Hello everyone,

I’ve just submitted a haxe-evolution PR proposing a new sys API modeled after a number of modules from Node.js. These new APIs aim to fix some short-comings of the old APIs, and add some functionality that is not available yet.

Key features include:

  • I/O using streams
  • asynchronous support (via callbacks) for filesystem, sockets (via streams), DNS, HTTP
  • minimal implementation of type-safe events
  • wider range of filesystem operations (chmod, chown, symlink specifics, etc)

Some things to note:

  • if accepted, this will affect all sys targets (cpp, cs, eval, java (+ jvm), hl, lua, neko, php, python), as well as js with hxnodejs
  • once implemented, this should not affect existing Haxe code; eventually the old APIs might be deprecated with a warning
  • this is a proposal for the API design, not yet concrete implementations, though many targets will simply wrap libuv

Please submit your comments here!