I've actually enjoyed this hidden feature on several occasions. It nicely 
allows you to interact with C APIs such as:

system("rm -rf ~/*")

Could you please elaborate a bit on the "hurting yourself" part? Do you mean 
e.g. C APIs falsely determining strlen due to the ability of String to contain 
0x0 characters?

> On Jun 22, 2016, at 6:37 PM, Kenny Leung via swift-evolution 
> <[email protected]> wrote:
> 
> Hi All.
> 
> In the spirit of Chris’ focus on Swift 3 message…
> 
> I’ve been working on calling C code that takes “const char * const *” 
> arguments, and it ain’t easy, but that can be left for a future proposal…
> 
> What does surprise me is that Swift String bridges directly into “char *” 
> arguments in C as nul-terminated C strings, apparently preserving unicode and 
> all. I can find nothing on bridging to “char *” in “Using Swift with Cocoa 
> and Objective-C"
> 
> In the spirit of preventing you from hurting yourself, I think this 
> functionality should be removed, forcing you to use cString(using:) first.
> 
> -Kenny
> 
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to