Re:C++ Add-ons for Node.js v4
by morebetterer on Saturday January 02, 2016 @01:13AM
(#10825306)
Since NAN basically parrots the v8 API, I find it's easier to just code to the ever-changing v8 API, rather than the ever-changing NAN API. With the former approach you get readable and debuggable code. I'm not sure what NAN isolates you from if it doesn't have a strong API guarantee to protect you from future v8 API changes.
Re:C++ Add-ons for Node.js v4
by Zarel on Saturday January 02, 2016 @01:43AM
(#10825344)
The article we're discussing answers this question - NAN gives you backwards compatibility with old versions of V8 (and therefore Node), while the V8 API doesn't.
Re:C++ Add-ons for Node.js v4
by Zarel on Saturday January 02, 2016 @02:07AM
(#10825398)
The point is that NAN2 is compatible with old versions of Node and io.js, not that NAN2 is compatible with NAN1.
This is bolded in the article we're discussing:
> NAN's promise is to provide a single API to develop against, not a forever-stable API, it was always anticipated that it would change and adapt to V8 but do so in a way that you get to remain compatible with older versions of V8.
This is bolded in the article we're discussing:
> NAN's promise is to provide a single API to develop against, not a forever-stable API, it was always anticipated that it would change and adapt to V8 but do so in a way that you get to remain compatible with older versions of V8.