[swift-evolution] [Draft] Fix a typo in two String methods

Chris Lattner clattner at apple.com
Sun Jul 24 11:22:18 CDT 2016


Fair enough.  I’m personally fine with “nullTerminatedUTF8” - I’m saying that “nullCharacterTerminatedUTF8” would be unhelpful.

-Chris

> On Jul 24, 2016, at 12:00 AM, Félix Cloutier <felixcca at yahoo.ca> wrote:
> 
> So I can see in hindsight that perhaps people meant "NUL-terminated string" the whole time, but "NUL-terminated string" has 19,700 results on Google, whereas "null-terminated string" has 192,000.
> 
> I have a funny anecdote to share. I got really upset on reddit one day <https://xkcd.com/386/> that someone said that some trojan was a "virus". That's not right! Trojans are not viruses! And then someone came along and asked, "what type of software would you use to remove a trojan?" And the answer to that, of course, is an anti-virus.
> 
> I can come up with a number of other instances where people use technically incorrect names that are just so powerfully ingrained that it's not even worth it to fight back. Like JPEG vs JFIF.
> 
> Point being, while I have lots of respect for standards, if what you want is consensus, siding with the 90% is a better idea.
> 
> Félix
> 
>> Le 23 juil. 2016 à 15:21:48, Andrew Trick via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> a écrit :
>> 
>>> 
>>> On Jul 23, 2016, at 3:16 PM, Chris Lattner <clattner at apple.com <mailto:clattner at apple.com>> wrote:
>>> 
>>> 
>>>> On Jul 23, 2016, at 2:38 PM, Andrew Trick via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>> 
>>>>> 
>>>>> On Jul 23, 2016, at 2:06 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>>> 
>>>>> On Sat, Jul 23, 2016 at 3:54 PM, Daniel Duan <daniel at duan.org <mailto:daniel at duan.org>> wrote:
>>>>> In the context of character sets, "nul" is the correct name for the 0 value. "null" only makes sense when we are talking about pointer-like references.
>>>>> 
>>>>> Oh, I see: "NUL-terminated" is a thing because "NUL" is the ASCII name. Still a little bizarre looking, though, especially if it's UTF8 rather than ASCII. I am less bothered by it now, thanks :)
>>>> 
>>>> Yeah. Using the ASCII abbreviation was intentional but after thinking about it for a second I still think it should be renamed. Swift methods are supposed to be spelled out in english. There’s no reason to use an abbreviation here.
>>> 
>>> “NUL” is an abbreviation for “Null Character”.  You think that it is a good idea to spell out its full two-word name?
>>> https://en.wikipedia.org/wiki/Null_character <https://en.wikipedia.org/wiki/Null_character>
>> 
>> I’ll take the troll bait. “nulTerminatedUTF8" should read “nullTerminatedUTF8” because
>> 1. null-terminated is a common english phrase
>> 2. the acronym is not recognizable lowercase and in the context of the above phrase
>> 
>> Andy
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160724/decfeed1/attachment.html>


More information about the swift-evolution mailing list