Apparently a situation has evolved over the years where there are three, four, or five main ways to write a nodeJS addon in C/C++ depending on where you're reading about it.
For those of us just trying to learn and write our first addon in 2021 it can be quite confusing. I might have a couple of tutorials open in my web browser and a couple of code repos downloaded from GitHub to see how certain things are done.
But unless there's a comment at the top that states clearly which of the four ways each tutorial or repo is using, it gets very confusing. And the names each has are not really distinct enough to be much help when you're just starting out.
So what are some things I can look for to know at a glance when I'm looking at code that uses each of these four ways?
I see that there are various main include files that might be at the top of the main C/C++ source file, and that there there are certain macros or function calls with somewhat different names that perform the same actions depending which way the addon uses.
This might be complicated by some of these ways either being wrappers around other ways or sometimes needing to call lower-level functions. I'm not sure.