Rename std.string.toStringz?

Walter Bright newshound2 at digitalmars.com
Sat Jun 25 15:28:18 PDT 2011


On 6/18/2011 2:59 AM, Jonathan M Davis wrote:
> Okay, clearly we're not going to reach any kind of consensus on this. We seem
> to be pretty thoroughly split between those who want to keep it as toStringz
> and those who want to rename it to toCString. Interestingly enough, _no one_
> seems to want to go with just camelcasing it to toStringZ. But regardless,
> without anything close to a consensus on this, it wouldn't make any sense to
> change the function's name and break all of the code that doing that would
> break. So, it's going to stay toStringz.
>


All these renames make me uncomfortable:

1. They break existing code. Nobody likes recompiling an older piece of code and 
have it gratuitously break here, there, and everywhere.

2. There is no such thing as a perfect name; bikeshed wars demonstrate this.

There ought to be a fairly high bar to renaming existing functions, not just a 
debatable and marginal improvement.


More information about the Digitalmars-d mailing list