I flew both. I have far more time in the DiamondStar than the Katana/Eclipse/whatever-it-is-this-week.
First, I'm pretty tall. DA-20 was somewhat uncomfortable. This isn't a consideration for many people, but it IS a consideration for me.
My big gripe about the -20 is I don't like flying a non-IFR capable airplane. We get marine layer pretty frequently here and not being able to fly in the clouds is a considerable limitation. The DA20 cannot be operated IFR (in the United States) due to its inability to survive a lightning strike (I think). If memory serves usable load is "not much". That said, it is a rather nice little airplane for just grinding around at very low cost. I forget precisely what it is, but the stall speed is ridiculously low on both airplanes - do NOT carry extra speed on final or you will float forever.
The -40, on the other hand, is the nicest single engine (training) airplane I've flown. It is very comfortable and most of them in the States are G1000-fitted. Same horsepower as the 172, but faster. If I had my druthers (whatever that means) I'd much rather fly a -40, owing to having a constant speed prop, more equipment, more horsepower and more capabilities.