From: Warren Young Date: October 21 2004 9:20pm Subject: Re: using namespace? List-Archive: http://lists.mysql.com/plusplus/3576 Message-Id: <41782814.6010609@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sasha Shipka wrote: > wndGlasila.cc:28: error: `MysqlRow' is not a member of > type `Gtk::TreeModel' Namespaces aren't the solution to this problem. The solution is to remove define_short.hh, and then deal with the consequences of that. This is on the Wishlist. I suspect it'll break a lot of code, but I really don't give a damn on this one. define_short is one of the worst ideas I've seen in a released library. > So, why don't mysql++ use namespaces instead of > macros? The library uses macros in a vain attempt at hiding the MySQL-ness of the library behind generic names. At one point, the maintainers of this library thought they'd make it work with other databases, so "Row" makes more sense than "MysqlRow", or even Mysql::Row. That dream is now dead, but some of its artifacts are still with us. Not to deflect your criticism (it's valid), but the fact that you've been bitten by this problem indicates that you're probably trying to mix GUI and database code in a single module. You might rethink your program's design a bit. The first time you need to move to a different database, you'll thank me. :)