talk-to / Chocolate

Make Cocoa more fun
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Consider renaming tdt_stringAfterNillingBlanks #73

Open mx4492 opened 9 years ago

mx4492 commented 9 years ago

Alternatives:

Since any of these will be a breaking change, consider doing this around the next major release.

chaitanyagupta commented 9 years ago

If you preserve the semantics of the current method and add a new method then it's not a breaking change. I would prefer this since changing the semantics of the current method means that one would need to check every usage and verify that expectations are not broken. This places an extra burden on the app developers even if you create a major release.

On Friday 30 January 2015, Manav notifications@github.com wrote:

Alternatives:

  • stringAfterNillingBlank
  • stringAfterNillingEmpty
  • Keep the current name but change semantics to remove all blanks.

Since any of these will be a breaking change, consider doing this around the next major release.

— Reply to this email directly or view it on GitHub https://github.com/talk-to/Chocolate/issues/73.

anomaly2104 commented 9 years ago

Also we should consider renaming tdt_isNonEmpty to something like tdt_isNonBlank. We are using two words Empty and Blank which introduces more confusion.

mx4492 commented 9 years ago

Reference note from the PR that begat this issue; will be useful when we get to fixing this:

I made this change because in the documentation of "tdt_stringByNillingBlanks", it is written that @returnnilif the receiver is blank, otherwise returns the receiver. I consider both @"" and @" " as blank. May be we should also add one more line of documentation there defining our defining our own meaning of blank for that method.