On Tuesday, September 06, 2011 18:54:45 Josh Simmons wrote: > On Tue, Sep 6, 2011 at 6:37 PM, bearophile <[email protected]> wrote: > > Josh Simmons: > >> My question is why do you even need a standard API for XML and JSON. > > > > It helps port your user code to other libs that use the same standard > > API. This is very useful. In D I'd like a basic standard API even for > > simple 2D graphics. > > > > Bye, > > bearophile > > This would be true if there were only implementation differences > between libraries doing roughly the same thing (in which case you'd > not need a new library anyway). Unfortunately this is not how things > work. > > So simple 2d graphics ey? vector or raster based? immediate rendering > or scene graph representation? animation? fonts? textures? > > XML ey? SAX, DOM, Pull, Data Binding? XPath? XSLT? > > The problem with php isn't just it's awesome naming, it's the fact > that anything that seemed like something somebody might use was added > as opposed to limiting itself to the must-haves.
Other major languages (such as Java and C#) have large standard libraries and have done quite well with them. In fact, I believe that the large size of their standard libraries is generally seen as major advantage of those languages. No, we can't have everything in the standard library. No, an XML parser in the standard library likely won't meet everyone's needs. However, having a large standard library can be of great benefit to the users of the language even if it doesn't solve every problem that they could possibly have. The question isn't really whether we should add stuff like XML parsing to Phobos. The question is what is the best general implementation for a such a module and whether we can get an implementation of high enough quality to be able to go in the standard library. It's a question of time, man power, and quality. Obviously, Phobos is not going to explode in size overnight, but it _is_ going to grow in size, and eventually it should be fairly large. We already have several useful additions in the review queue which will likely make it into Phobos in one form or another over the next few months. - Jonathan M Davis
