On Sun, Jan 18, 2009 at 04:31:12PM +0200, Lasse Kärkkäinen wrote: > > the C++ compiler complains about the metaobject, etc) . But given the > > extremely confusing output any C++ compiler spits when it finds a > > problem with templates, even more when using Boost, I'd rather face > > "moc" than Boost templates. > At least you get a line number within your own code when doing it with > templates.
And that line number is quite often not where the mistake is. > No exceptions > => there is no way to signal errors from constructors > => more objects get constructed even though an error has already > occurred, before the error can be checked (e.g. via isError()) > => cannot do construction in constructors > => have to use two-phase construction instead (init methods) > => RAII idiom (a *very* central part of good C++) breaks > => half-initialized objects (init called yet? did it fail?) > => have add logic to each member function to verify object state first All your points boil down to the first one. That being said : exceptions also have a huge cost. You must surely be aware that writing exception safe code is difficult and even the best C++ guru's out there have published papers and books wherein they make fatal and gross mistakes against it. Exceptions are certainly an integral part of C++, but their use is optional and is more often than not, unwarrented. In fact, the number one design criterium > Oh, yes. Another reason not to use Qt. Major NIH of standard library > features. I would also like to point out that templates are not just > generics, even though many people seem to think so. I only partially agree here. The container classes of Qt provide little added value. However anyone who thinks std::string and std::wstring are good enough classes to manipulate user-interpretable strings has probably not yet programmed an properly internationalized application. Unfortunatly there is no support in the standard for the multitude of character encodings and conversions out there. On top of that char is not even guaranteed to fit UTF-8 and wchar_t is not guaranteed to fit UTF-16. That is a serious lack of real-life-empathy from the C++ standards commitee, something from which they have suffered a lot before and which they are slowly correcting. I note also that Wt already has its own WString class. That is no coincidence. It would be a real net win for Wt to have access to QString or something similar. Btw, it is silly to rail against using Qt in Wt and postulating C++ good standards that Wt itself violates, like prefexing everything with W/Q instead of using namespaces. cu bart ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
