digitalmars.D - Improvements to std.string
- Jonathan M Davis (19/19) Jun 12 2011 https://github.com/D-Programming-Language/phobos/pull/101
- Adam D. Ruppe (9/10) Jun 12 2011 I think it should stay just how it is: toStringz, with a lowercase
- Michael Chen (3/13) Jun 13 2011 I vote for the changes. They are better name for newbies like me.
https://github.com/D-Programming-Language/phobos/pull/101 I made several improvements to std.string, std.uni, and std.ctype - primarily with the aim of fixing function names to be properly camelcased and improving unicode support - and while the changes are generally fairly simple and generally well-organized, there are quite a few of them, and I think that the changes could use some extra eyes. Also, there are probably a few changes which deserve some discussion. For instance, a couple of items which already came up 1. Would it be better to rename toStringz to toCString when fixing it so that it's properly camelcased (in my changes I just did toStringZ since it was the straightforward fix to the naem, but it's not exactly a great name to begin with). 2. Should std.ctype be renamed (or at least the updated functions be put into another module which will replace it) - e.g. std.ascii? I don't want want a bikeshedding discussion, but it is a fairly large commit, and it could use a looking over by more than just a couple of Phobos devs, and some of the changes likely do merit some discussion. So, feel free to look over the pull request and make appropriate suggestions. - Jonathan M Davis
Jun 12 2011
Jonathan M Davis wrote:Would it be better to rename toStringz to toCString when fixing itI think it should stay just how it is: toStringz, with a lowercase z. The reason is a "stringz" is actually a proper name of sorts - the z at the end isn't a new word, but part of the first one. At least that's the way it was in assembly! Also, it ain't broke. I've sometimes gotten tolower wrong due to case. I've never made a mistake on toStringz. I'd be surprised if anyone has.
Jun 12 2011
I vote for the changes. They are better name for newbies like me. On Mon, Jun 13, 2011 at 9:29 AM, Adam D. Ruppe <destructionator gmail.com> wrote:Jonathan M Davis wrote:Would it be better to rename toStringz to toCString when fixing itI think it should stay just how it is: toStringz, with a lowercase z. The reason is a "stringz" is actually a proper name of sorts - the z at the end isn't a new word, but part of the first one. At least that's the way it was in assembly! Also, it ain't broke. I've sometimes gotten tolower wrong due to case. I've never made a mistake on toStringz. I'd be surprised if anyone has.
Jun 13 2011