Hacker News new | ask | show | jobs
by johannes1234321 2194 days ago
Doing that means you have to first agree on a name, strcmp has vertical consistency with C. str_compare might be nice, string_compare even nicer.

Once that debate is over you have to migrate all old code and all developers and teach them to use the new form. Throwing away all preexisting documentation and telling them why typing more is better.

Only then the old form can be removed.

Is it really worth it? - And yes, there is an argument "in the next 25 years there will be noore code written than in last 25" but still, is it worth it?

To give a feeling on the time period: PHP had this register_globals feature where URL (GET) and POST parameters became global variables. Getting rid of that, from introducing a replacement, over changing default and final removal of the option, too 10 years. When taking that time frame it's 10 years of confusion.

1 comments

Problem 1 is basic standardization and naming things. Hard, but possible.

Problem 2 is is solved by adding the deprecation warnings. The code works, but it generates warning messages.

Yes, it'll take some time, but I'd argue it's necessary. Unless you've memorized the entire standard library, remembering which functions use underscores and which don't (and which ones use "to" vs "2") is an unnecessary mental burden.

Deprecation warnings which many people will ignore, while new learners still learn with old material.

It is really tough and costs lots of energy.

If you have the energy: Create a complete proposal and push for it. If people feel like you it will go through.