Change the name of the normalize function #4
Comments
I don't know. I don't entirely disagree, but I have no clue what else to name it, and the language does provide good ways to disambiguate. |
Well, technically I think |
Hmm. Well, |
kxml, the XML library I was using before the release of dxml, calls those functions A side note: I think handling of |
Handling them in a separate function means processing the data twice to strip out the carriage returns and transform the character entities. So, I don't think that it really makes sense to separate that into two separate functions.
That's not quite true. https://www.w3.org/TR/REC-xml/#sec-common-syn also talks about either removing |
#4 normalize is now decodeXML and asNormalized is now asDecodedXML. The old names are now deprecated aliases and are scheduled to be removed in dxml 0.4.0. The new names fit better with the newly added writer functionality (denormalize didn't seem like a great function name) and don't risk conflicting with std.uni.normalize (which stands a fairly high chance of being used in conjuction with dxml and thus would result in symbol conflicts).
While D has good tools to handle name conflicts it can still be useful to avoid needing to use them. And std.uni.normalize seem likely to be a function that might be imported when dealing with XML and so I believe that avoiding the conflict all together would be a good choice.
The text was updated successfully, but these errors were encountered: