Equip your Genius
Welcome to the Parallax Discussion Forums, sign-up to participate.
Learn with BlocklyProp
Prop 2 Languages, C/C++, Arduino IDE
Please, say "C or C++", not "C/C++". They are two different languages. Yes, it's possible to write kind-of C in C++, but then you're writing ~C, not C++. They are two very very different beasts. I really despise that term "C/C++". Programming in BASIC/Pascal, anyone?
Not quite a valid comparison. C++ was derived from C and both are often supported by the same compiler. BASIC and Pascal are totally different languages.
Derived from C doesn't really matter - it isn't C anymore. Perhaps a better simile would be "BASIC/VB", where BASIC means Darthmouth. It simply doesn't make sense to combine the two. That VB has a built-in ability to compile old GW BASIC (to some extent) doesn't matter - that's a compiler issue, not a language issue.
C and C++ are so different that in my company we have entirely different programmer teams for the projects using one or the other.
Given that C++ is derived from C and largely backwards compatible, C++ compiler will happily compile C source as C++, I think C and/ or C++ is reasonable. i.e. C/C++. Even combined in the same program.
BASIC/Pascal sounds like a non-starter. Maybe it's possible under the .net framework. I've done a lot of work on C/C++/Pascal all in a single program.
Let's look at this with the appropriate context. Specifically, this thread is about compilers and interpreters, and which will be available for the P2. Clang and GCC - the only two C or C++ compilers being considered for long-term development of the P2 - contain both C and C++ compilers. So in this thread, C/C++ simply refers to "a compiler or compiler collection that can deal with C and C++ source code".
Now, elsewhere on these forums I refer to C/C++ as well. Most of the time, I use "C/C++" in the exact same sentence, over and over. Somebody says "I'm having a problem, can someone help?" and they don't post source code. Or they're asking "What's the best way to do X?" or "can someone share a sample library for peripheral X?" So I follow up with "What language are you programming in? Spin? Basic? C/C++?" In this context, I'm guessing the original poster doesn't really care whether I provide a library in C or C++ - they just want
that will compile with their IDE/compiler.
So yes, in a company like yours with multiple teams writing C or C++ projects, it makes sense to have experts and specialized teams for each. In the context of these forums, it does not. C/C++ is good enough.
Of course, this is just my opinion
: C++ HAL (
ayer) for PropGCC; Robust build system using CMake; Integrated
(Arduino port); Instructions for Eclipse and
; Example projects; Doxygen documentation
Tag me with "@DavidZemon" if you have a question for me. I will be checking these forums far less for the forseeable future.