> I've been reading the discussion in "Final by default for classes and 
> methods" and although I don't have a strong position towards what the default 
> behaviour should be, I think a directive to change that behaviour should be 
> added as when nullability was introduced into Obj-C.
> 
> In the current model of Swift, where methods and classes are not final we can 
> ease that by doing something like this:
> 
> ASSUME_FINAL_BEGIN
> class MyClass {
>     func aMethod(arg: String) {
>         
>     }
>     
>     func anotherMethod(number: Int) {
>         
>     }
> }
> ASSUME_FINAL_END

I talked about this possibility in the thread you mention, and there are imho 
several other issues that could be addressed in a similar way:
[swift-evolution] [Pitch] make @noescape the default
[swift-evolution] Make non-void functions @warn_unused_result by default

But there would be one big downside:
All this fruitless arguing about better defaults keeps amateurs like me busy — 
just imagine the havoc I'd cause in the complicated and important topics ;-)

Best regards,
Tino
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to