On Thursday, October 26, 2017 19:19:57 Adam Wilson via Digitalmars-d wrote: > On 10/26/17 17:51, Jonathan M Davis wrote: > > On Thursday, October 26, 2017 03:25:24 Adam Wilson via Digitalmars-d wrote: > >> On 10/25/17 23:57, Jacob Carlborg wrote: > >>> I'm more concerned that I don't think we'll manage to implement a > >>> complete API and 100% bug free at the first try. > >> > >> Depends on how one defines first try. Phobos as a pretty solid process > >> for making sure these things are reasonably bug free. And near as I can > >> tell, Phobos is pretty good about accepting bug fixes. > > > > The bigger problem is API bugs. The review process is rigorous enough to > > weed out a lot of stuff, but the end result is typically an API that we > > _think_ looks good but usually hasn't seen much real world use (much as > > its design may be based on real world experience). And if it turns out > > that the API has problems, it can be very difficult to fix that in a > > way that doesn't break code. Sometimes, we're able to reasonably do > > something about it and sometimes not. In theory, std.experimental would > > mitigate that, and that's where anything that was accepted would go > > first, but the process for getting new modules into Phobos is very much > > geared towards getting an API right up front rather than getting > > something that's close and iterating towards where it ultimately should > > be. > > > > What would probably be better in general would be to be writing stuff > > that ends up on code.dlang.org first and gets some real world use there > > and then look at getting it into Phobos later rather than aiming > > directly for Phobos. Not only would that likely help lead towards > > better code being in Phobos, but we'd still get useful stuff even if it > > didn't make it into Phobos. > > > > - Jonathan M Davis > > I understand the concern, however, I can see potential mitigations. For > one, steal an API concept from somewhere else. I've had reasonable > success so far stealing ADO.NET and the refactoring it into something > more idiomatic. Using that as a starting point gave me a pretty good > understanding of what was needed and it gave me a prototype API that has > been battle-tested. > > Has anything from code.dlang.org been pulled into Phobos yet? I'm not > aware of anything. code.dlang.org is where Phobos projects go to quietly > die in obscurity.
Nothing has been pulled into Phobos from anywhere in a while. The last thing was probably checkedint, and before that it was std.allocator - both of which came from Andrei. ndslice was in std.experimental for a little while but Ilya removed it, because he decided that it wasn't working to have it in Phobos, because he couldn't continue to improve on it there. Beyond that, I think that the last thing was the logger, which has just languished in std.experimental. It's my understanding that it needs some more work, but basically, once we added std.experimental, nothing has made it into Phobos proper. And over the last few years, there haven't been many attempts to get anything into Phobos, so not much has even made it into std.experimental. There was the GSoC project for a new XML parser, but that project seems to have died after the student got too busy with school after GSoC, and Sonke's std.json replacement didn't finish making its way through the review process, and I think that Sonke has given up on getting it in (if I understand correctly, there was just too much disagreement over what the std.json replacement should look like). Overall, people have just stopped trying to get major stuff into Phobos. New functions get added to existing modules, but pretty much no one seems to want to go through the Phobos review process to get anything into Phobos. code.dlang.org is where folks put anything that they're doing that they want to make available, and IIRC, the only item from there that's even attempted to make it into Phobos was Sonke's JSON parser. Much as some folks continue to talk about getting some piece of functionality into Phobos, no one is trying if it's anything major. So, it's not like Phobos projects are going to code.dlang.org to die. In general, they simply aren't even being attempted, and any serious projects that do exist are on code.dlang.org. Some do sit there unfinished (e.g. std_experimental_xml), but largely, the authors just don't want to go to the effort of getting the code into Phobos. And honestly, in general, at this point, I don't think that I'd want to bother either. It's quite a lot of work to get something through the Phobos review process, and once it's in Phobos, you lose control over it. If I work on something major, I can just put it up on code.dlang.org, and anyone who wants to use it can, and I have full control over what I do with the code base without having to get approval from Andrei or anyone else as to what I do with it. So, unless we're talking about something that practically needs to be in the standard library, I doubt that I'd bother trying even if I wrote the code and was maintaining it. And most stuff really doesn't need to be in the standard library, much as it might be nice. But even if the goal is to get some of this stuff into Phobos, I still think that we're better off putting it up on code.dlang.org first and getting it battle-tested instead of pushing to get it put directly into Phobos. - Jonathan M Davis