Originally Posted by ChaosEngine
>> C has much easier syntax and can do lots of things that C++ can, so I really don't see why esbo's preference is a problem for anyone.
esbo didn't state a preference. He simply came on here trolling and made a stupid post that C++ is a waste of time and space. I've tried to educate him or at least get him to present a reasonable argument. I now see this is a total waste of time.
>> Moreover, you're judgement of C++ being such an improvement is a little misfounded.
I'm not saying C++ is perfect or even better than C in every environment (I actually work developing an emulated embedded platform in C++ that runs embedded C code). If you read my previous posts you'd see I agree that C++ has it's flaws and I actually use python for most tasks now.
That said, if you come on this board and post that "C++ is a waste of time and space" without backing it up and if you can't see the benefits of C++ over C, you're an idiot. Most of the best embedded C programmers I know (and I know some top-notch guys with 20 years c programming behind them) end up emulating C++ features in C. Hell one of them even wrote virtual function tables to emulate polymorphism. You CAN do these things in C, but it's easier and cleaner in C++ so why not let the compiler do the work? that's what computers were invented for! esbo talks about not reinventing the wheel, and then goes out of his way to rewrite in code something C++ gives you for free!
>> Imitating a template is possible: you can just create a function with void pointers in C.
and that is exactly the kind of hacky unsafe code that gives C such a bad reputation.
>> This board has 256k working memory, try putting all your objects that keep track of of their own state in there....
as the monty python guys would say...
luxury, our board has 96k! Of course C is the language for that environment, but that's an external constraint. Given the choice, most intelligent developers will use the highest level language possible for the job. If you don't, you're wasting your employers time and consequently, money and you should be fired.