[swift-evolution] There should be no reserved words (keywords) ?

Adrian Kashivskyy adrian.kashivskyy at me.com
Fri Mar 4 07:03:58 CST 2016


> func if<T>(@autoclosure condition: () -> Bool, @noescape closure: () -> T) -> T? {
> 	if(!condition()) {
> 		return closure()
> 	}
> 	return nil
> }
> 
> if(2 + 2 == 4) {
> 	return 5
> }


In the world without reserved keywords, what should the above code do? 😜


Pozdrawiam – Regards,
Adrian Kashivskyy

> Wiadomość napisana przez Ted F.A. van Gaalen via swift-evolution <swift-evolution at swift.org> w dniu 04.03.2016, o godz. 13:43:
> 
> Hello, 
> 
> reserved words:
> 
> In short:
>                  -=  there should be none =-
> 
> A compiler should have enough intelligence 
> to determine from the statement’s context 
> if words are used as a keywords or not.  
> 
> Like e.g. in PL/1 as I posted here before.
> 
> What’s your opinion?
> 
> Kind Regards, Ted.
> 
> 
> 
> 
> _______________________________________________
> 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/20160304/a8c95397/attachment.html>


More information about the swift-evolution mailing list