| General > General Technical Chat |
| How many people code in C these days, and if so, why? |
| << < (99/99) |
| shangaoren:
Both languages are compiled languages, comparing two well written programs will result in a equality in terms of size and performance. I use c++ for embedded application, i really like constexpr, template and OO programming, i feel it more flexible but there is nothing that can't be done in C, it's just i prefer C++. The debate of STL is not meaningful as there is no such thing in C, IMO it's an "additionnal framework" you can do c++ without using STL. STL needs to be avoided for memory allocation in embedded application just like string and printf in C ... Any language can tend to crap if written by a bad programmer .... |
| JPortici:
--- Quote from: rsjsouza on May 24, 2020, 01:33:35 pm ---I agree, but to be fair I see that with C as well, especially with embedded. Modern compilers do a much better job reducing a somewhat lenghty (but legible) code but developers fall to the temptation to write cryptic constructs with the same effect. Perhaps to showcase how smart they are? Or job security? --- End quote --- I'd be tempted to say the first. It's not easy to admit that the compiler can be smarter than you, especially if you used to program with -O0 (ages old XC8 in Free mode cough cough..) and/or write cryptic code so you keep thinking you can write better assembly. |
| paulca:
On C++. I had to create a static class variable. The initialiser syntax is absurd. It's like they thought, "Which parenthesis have we used least? Give it some exercise." String MyESPDeviceClass::firmware{ String("") }; Wha?!? It works, but it makes no sense. ... and don't even get me started on class/object initialises versus constructors. My head melts. |
| Navigation |
| Message Index |
| Previous page |