From: Warren Young Date: July 14 2007 4:20am Subject: Re: Connection::connect() interface is changing List-Archive: http://lists.mysql.com/plusplus/6786 Message-Id: <46984EF1.9020301@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Joel Fielder wrote: > Connection > connection(ConnectionLoginDetails().Database("whatever").Server("localho > st").Password("noh4xzorssszz")); My purpose in doing this isn't because I believe the new parameter order is the One True Way, it's because I want to reduce typing by eliminating the need to pass all the parameters. Adding verbosity is exactly the wrong thing. I could be talked into something less verbose, but in the same vein, like this: class Connection ... { public: class TCP { public: TCP(host, user, port, etc...); } Connection(const TCP& tcp); #ifdef MYSQLPP_PLATFORM_WINDOWS class NamedPipes { public: NamedPipes(); } Connection(const NamedPipes& np); #else class DomainSockets { public: DomainSockets(path); } Connection(const DomainSockets& ds); #endif } Usage: Connection con(Connection::TCP(host, user, port)); Connection con(Connection::NamedPipes());