2

Recently, I learned the phrase "native module", I don't know exactly what's the meaning of native in programming. As far as I know, if a module compiled from C/C++, it's native. Am I right on this? Could you tell me more about it?

tojocky
  • 46
  • 7
Vimos
  • 691
  • 1
  • 9
  • 23
  • Are you talking about Node.js addons? http://nodejs.org/api/addons.html – Qantas 94 Heavy Jul 25 '14 at 06:13
  • 2
    In node, most modules are written in javascript. Some modules, like the fs module are written in C/C++, as you can't edit files from plain javascript. IIRC, these modules are called 'native' because the code for these modules is slightly different depending on the OS node runs on. – Ferdi265 Jul 25 '14 at 07:24

1 Answers1

1

Yes, you're right. For more detailed info about addon you can find on the official doc: http://nodejs.org/api/addons.html

tojocky
  • 46
  • 7
  • 1
    While this is the perfect answer to his second question, I think you should first answer his first question with something along the lines of "yes, you're right". Also, there is no need to speculate "I think you mean"... because all native modules in node.js are addons (in other words, "addons" is just a special name for native/binary modules). – slebetman Jul 25 '14 at 07:36