Re: Merge node.js into haxe std?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Merge node.js into haxe std?

blackdog

Dion

I looked at the patch.

I don't think the tweaks to the standard lib should go in (probably NC
won't either) - e.g. haxe.Timer/http etc. I suspect NC meant the small
tweaks in Boot/Lib but not the other stuff.

Having written the original tweaks to these libs, and trying to get
quite far along the way, my position is that there's just a disconnect
between haxe/synchronous and nodejs async, until haxe has an NC blessed
async api file/io interface (I've asked him for one), I don't think it's
worth trying to shoehorn node into haxe stdlib.

Let's say we did put the tweaks for File system in etc, basically
you're encouraging haxe people to use nodejs platform in a non optimal
way as you need to use the nodejs sync calls for everything, and I
really don't think that's in the haxe's best interest. The node sync
calls are good for tweaks and scripting but they shouldn't be
encouraged for servers etc - which if hidden under the haxe api that's
exactly what would happen. To be specific, node.js is single threaded
thus if you use it like you would neko you're going to be in trouble -
we shouldn't make it look like a sync api when it's not.

Thus, my argument is if you want to use node, then use the node api in
it's raw state. Therefore, node api in a haxelib and add the
3/4 lines of tweaks to Boot.hx and Lib.hx and that is pretty good for
now. On saying that Nicolas has added jQuery to the std, and ruined haxe
purity so I don't see why he can't just ship the node.js api too ;)

R

--
Simplicity is the ultimate sophistication. ~ Leonardo da Vinci

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Merge node.js into haxe std?

Nicolas Cannasse
Le 14/06/2011 04:28, blackdog a écrit :
>
> Dion
>
> I looked at the patch.
>
> I don't think the tweaks to the standard lib should go in (probably NC
> won't either) - e.g. haxe.Timer/http etc. I suspect NC meant the small
> tweaks in Boot/Lib but not the other stuff.

Indeed.

> Thus, my argument is if you want to use node, then use the node api in
> it's raw state. Therefore, node api in a haxelib and add the
> 3/4 lines of tweaks to Boot.hx and Lib.hx and that is pretty good for
> now. On saying that Nicolas has added jQuery to the std, and ruined haxe
> purity so I don't see why he can't just ship the node.js api too ;)

Two reasons for not shipping nodesjs apis with haxelib :

a) nodejs might evolve faster than haXe release cycle, so it's better to
have independent release

b) while I'm using JQuery and is okay to maintain it, it's not the case
for nodejs ;)

So I'm still if favor of having a minimal patch for /std classes + a
separate nodejs library on haxelib for all other apis.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Merge node.js into haxe std?

Dion Whitehead Amago
Ok, sounds good.  I'll leave it to you Ritchie, to add the std lib tweaks?

Dion.

> Two reasons for not shipping nodesjs apis with haxelib :
>
> a) nodejs might evolve faster than haXe release cycle, so it's better to
> have independent release
>
> b) while I'm using JQuery and is okay to maintain it, it's not the case for
> nodejs ;)
>

--
haXe - an open source web programming language
http://haxe.org