[SOLVED] Arduino language

When programming, one has to distinguish between the "Language" and "everything else that goes into writing the program" - the "environment." That includes the libraries, the operating system (if any), the compilers, and the build environment. Some languages/systems will blur the distinctions - if you write a fortran program for an IBM370 system, it would be pretty significantly standardized fortran, and all or most of what makes it specific to a particular task would be handled by external setup (JCL in IBM-speak) that would map Fortran-style abstracted 'files' to actual disk images or card readers or printers or whatever. The original Pascal was similar.

The best analogy I can think of offhand is Mac vs Windows.
You can take a lovely C++ program (that everyone agrees was written in C++) from a Windows system, and when you try to move it to a Mac, it won't work. It won't even compile, and you probably need to do a lot of work before you can even attempt to compile it (What with "Windows Studio" - the common Windows IDE, not being nearly the same as XCode - the common Apple IDE.)
This doesn't mean that the program wasn't written in C++, or that the Mac doesn't support C++. There is just "stuff that is different."

An embedded AVR (with 32k/2k of memory) is MUCH MORE DIFFERENT from a Windows PC than a Mac is from Windows, so the difference in programming is also higher. Some things are added or subtracted from the Arduino to emphasize those differences (loop/setup vs main, for example.) Some other things are avoided because they are unlikely to work well (or at all) in the Arduino environment (most of STL, exceptions, dynamic allocation.) Some purists might claim that these mean that it's not "real C++" any more, but 1) Those aren't the people who usually miss-use the "Arduino Language" phrase and 2) They're wrong.

In favor of it being C++:

  • The (infamous) pre-processing of the .ino files to make C++ consists entirely of things that a C++ programmer would have had to do manually in a traditional C++ program (writing prototypes, figuring out library locations, specifying "standard" includes)
  • That pre-processing results only prepending some additional C++ to the file, and modifying the compiler/linker commands. The actual body of the program is not changed at all.
  • A standard C++ compiler is then used to compile the program.