We need to enhance the standard library!

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 7 18:49:24 PDT 2016


On Wed, 07 Sep 2016 15:22:01 +0000, Jack Stouffer wrote:

> On Wednesday, 7 September 2016 at 05:58:37 UTC, Brian wrote:
>> Standard library thin! The lack of a lot of commonly used functions!
>> For example, HTTP client, database abstraction layer, mail delivery,
>> Mathematical calculation standard library.
>
> 2. Everything but the math library is extremely prone to change within a
> couple of years and is therefore not really a good candidate for
> standardization.

http://www.rfc-base.org/rfc-5321.html
https://tools.ietf.org/html/rfc7230
https://tools.ietf.org/html/rfc7540
http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?
csnumber=53681

JDBC and ADO.NET do a good job of abstracting away specific SQL database 
libraries to a greater degree than ISO 9075 alone would allow.

Perhaps you could explain what you mean when you say that these protocols 
and systems are poor candidates for standardization and how .NET and Java 
have suffered for including them in their standard libraries?

> There's a reason that there are three different ways to connect to a
> MySQL database within the PHP standard library: they tried to
> standardize something that shouldn't really be standardized.

The reason there are three ways to connect to MySQL in PHP are:

* In the early days, they wanted to ship something that worked with 
minimal effort, and wrapping the C API directly gave them that. This 
wrapper was deprecated in PHP5.5 and removed in PHP7.
* They later needed to provide a sensible API exposing all of MySQL's 
features, so they implemented MySQLi.
* They also wanted to provide a consistent API for multiple SQL 
databases, so they implemented PDO and a driver for MySQL.

I don't see how standardization has anything to do with it. Or putting 
too much in the standard distribution.


More information about the Digitalmars-d mailing list