Ideally, sure.  But this set of patches deals with making it backwardsly compatible.

The current MysqlDriver processes options as follows:
                $options['host'] = (isset($options['host'])) ? $options['host'] : 'localhost';
                $options['port'] = null;
                $options['socket'] = null;

Which is what causes some of the current issues, it's not possible to pass a port or socket name to the driver, all we can do is pass a single string, $options['host'], which must contain all the configuration data - both the host and optional port number as ipaddress:port.  For Google Cloud SQL we also may use a socket string, formatted as /cloudsql/instanceid:dbservername  <-- NOTE the colon in the socket name, current hostname parsing fails here.

The application should use the socket name only if it is running on a Google App Engine PHP Instance.  If you are running locally, or decide to deploy to a virtual server[such as Google Compute Engine] then you have to use the ip address/port number.

So the point of the check on the constructor is to determine where the PHP code is executing and set the socket name if running on GAE - and the standard mysqli 'host' [which is host and port combined in one string] if running anyplace else.

This allows me to avoid cut and pasting any code from mysqli in the connect method.  In the connect method, if it is not running on GAE then I call the parent class's connect method which can process the host string as it is used to.  If it is running on GAE, then I use the API calls specific for GAE.