On Tue, Sep 6, 2011 at 8:51 AM, Andrei Alexandrescu <
seewebsiteforem...@erdani.org> wrote:

> On 9/6/11 2:35 AM, Walter Bright wrote:
>
>> On 9/5/2011 11:39 PM, Jacob Carlborg wrote:
>>
>>> We don't want to have a standard library like the one in PHP where
>>> there seems
>>> to be no naming conventions at all.
>>>
>>
>> I don't think that is the reason PHP is such a bear to work with.
>>
>
> Probably. At any rate, what I now think as a promising path is with new
> module names. Let's leave the likes of std.xml and std.json in peace, then
> pick a naming convention for the new ones and create whole new modules
> replacing them. Then people who are ready for the migration change
>
> import std.xml;
>
> with
>
> import std.some_naming_convention_**involving_xml;
>
> and fix whatever code breakages that entails. If they're pleased with
> std.xml, nobody's holding a gun to their head.
>
> Months and years go by, and nobody uses std.xml because the new module and
> the migration path are copiously advertised in the documentation. At that
> point we can discuss excising std.xml altogether and replacing it with the
> new one. And so the new becomes old, just like in dialectics.
>
> There's a successful precedent in C++ - stringstream vs. strstream. The
> only missing thing is that C++ did not choose a naming convention because
> they limited themselves to only one header.
>
> So what should we use? xml2? new_xml? FWIW we use the prefix "new_" at
> Facebook to good effect. Or should we, au contraire, use "old_" for the old
> module and advise people who want to stick with the old modules to change
> their imports?
>
>
> Andrei
>

Along these same lines I'm wondering why not simply call this new module
std.io rather than use the existing name std.stdio?  It'd avoid the code
breaking issue and help reflect that this new module isn't based around C's
stdio FILE (at least that's what I gather).  Also, the code is written from
scratch so that's another reason for why I don't think it should have the
same name.  The only reason I can think of is if it provided significant
improvements over the existing std.stdio without causing massive breakage.

Regards,
Brad Anderson

Reply via email to