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

Daniel Duan daniel at duan.org
Sat Jul 23 17:27:07 CDT 2016


Here's the standard where the character is defined. It refers '\0' as NUL most of the time but uses the word NULL as well ¯\_(ツ)_/¯.

http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf

I'm dubious about this. 

Daniel Duan
Sent from my iPhone

> On Jul 23, 2016, at 2:24 PM, Nevin Brackett-Rozinsky <nevin.brackettrozinsky at gmail.com> wrote:
> 
> And yet the *name* of the character is the “null character”, and a string that terminates in one is called a “null-terminated string”. Those are the terms of art, and I would not expect an abbreviation in this context.
> 
> +1 to the proposed change.
> 
> Nevin
> 
> 
>> On Sat, Jul 23, 2016 at 5:06 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
>>> On Sat, Jul 23, 2016 at 3:54 PM, Daniel Duan <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 :)
>>  
>>> 
>>> This is my impression anyways.
>>> 
>>> Daniel Duan
>>> Sent from my iPhone
>>> 
>>>> On Jul 23, 2016, at 1:41 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
>>>> 
>>>> World's shortest proposal:
>>>> 
>>>> 
>>>> Introduction
>>>> 
>>>> In `String`, the methods `nulTerminatedUTF8` and `nulTerminatedUTF8CString` have the word "null" misspelled
>>>> 
>>>> Motivation
>>>> 
>>>> There is a typo
>>>> 
>>>> Proposed solution
>>>> 
>>>> Fix the typo
>>>> 
>>>> Impact on existing code
>>>> 
>>>> Emit a fix-it for existing code
>>>> 
>>>> Alternatives considered
>>>> 
>>>> Keep on spelling "nul" without the second "l"
>>>> 
>>>> Acknowledgments
>>>> 
>>>> Thanks to Andrew Trick for confirming that the existing spelling is bizarre
>>>> 
>>>> _______________________________________________
>>>> swift-evolution mailing list
>>>> swift-evolution at swift.org
>>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160723/fb7d0c3b/attachment.html>


More information about the swift-evolution mailing list