Quote:
Originally posted by darwen
But I have my own classes to do all of that anyway and they are all derived from MFC.
And they have not been peer-reviewed by ANSI, so why should any of us use them? How do we know your classes aren't full of bugs? Are you now saying that Joseph (the OP) should start using your classes (or code his own)? You are talking about the merits of MFC, and then you state that you still need to write your own functions -- more code to maintain, more potential bugs.
Also, I highly doubt that the number of functions you have written come anywhere close to what is provided by the STL container and algorithm functions.
Quote:
So in my opinion disadvantages of STL -
(1) It doesn't look very nice (if you look at STL-code and the equivalent non-STL then the STL looks really messy).
As I stated before, the problem that you are having doesn't seem to be STL, but template syntax in general. You can code a non-STL application, and it will look messy to you since it may use templates.
Quote:
(2) Can't do memory tracking etc on it.
Why would you need memory tracking for the STL containers? The containers already work. The only memory tracking you would need would be on your own classes.
Quote:
(3) Can't inherit which means going around the houses most of the time.
I don't know what you mean by "going around the house". Ever hear of generic programming? You don't accomplish that by inheritance, but by template programming.
Quote:
Advantages of STL :
(1) Sorting.
Sorting is just one example. Have you seen the list of algorithm functions? How about searching? How about calling a function on all elements of the container? MFC has no such functions. Have you ever used iterators? I think you need to take a look at STL in its entirety.
Quote:
Sorry, I didn't intend for this to turn into a flaming match. I meant for it to be a real discussion of the pros and cons of STL Vs MFC
This has been rehashed time and again on different forums. MFC (in terms of the container classes) has always been deemed inferior to STL by most, if not all, C++ professionals who have name recognition. Sorry, but that's the consensus.
Regards,
Paul McKenzie