Anonandon
Novice
- Joined
- Feb 22, 2011
- Messages
- 5
They are a step above macros but have a lot of extra problems that make them problematic when implemented poorly (ie STL, which for STL Port is itself is implemented almost entirely in macros with only the interfaces templates).triCritical said:One of the things I enjoy about C++ is the Standard Template Library (STL) and templates in general.
Really? You never heard of void*? You never heard of macros? Also, see above.triCritical said:Two weeks ago I wanted create an algorithm using imaging technigues. I would have loved to have had things like the queue, stack, vector and map classes at my disposal.
There's no real benefit to using C since you can do anything in C in C++ and have a few nice features amongst the crap and VC++ will compile C and C++ exactly the same these days anyway.triCritical said:Instead I had to kind of recreate a half ass thing in C without the real power of classes and it my idea turned out not to even work. It was just a big a waste of time. As for templates, in one of my physics classes in graduate school I wrote a matrix class, that essentially worked of matrices, (didn't have access to the pre-built matrix class). Anyhow whenI got my job over 2 years ago, I translated it to see and recently incorporated into the software we are making. The problem is that someone needed a floating point version of it and now we have two of every function.
I admit C++ is fatter, slower and often times more difficult to read, but it can make your life easier. When optimazation and clean code is important I will always use C.
If your C++ is more unreadable then you are doing things wrong.
Yes I realize this post is 8 years old. You better have improved since then boy.