[swift-evolution] [Proposal] Sealed classes by default
laurent.mihalkovic at gmail.com
Tue Jun 28 10:44:05 CDT 2016
> On Jun 28, 2016, at 4:59 PM, Charlie Monroe via swift-evolution <swift-evolution at swift.org> wrote:
>>> On Jun 28, 2016, at 4:55 PM, Sean Heber via swift-evolution <swift-evolution at swift.org> wrote:
>>>> On Jun 28, 2016, at 9:52 AM, Mark Lacey via swift-evolution <swift-evolution at swift.org> wrote:
>>>> On Jun 27, 2016, at 9:10 PM, L. Mihalkovic via swift-evolution <swift-evolution at swift.org> wrote:
>>>> -1 for the fact that if all devs can write working code, fewer can do it in a clear structured fashion that is well designed for extensibility.
>>> This sounds more like an argument for having sealed classes than not. As the proposal points out in the motivation, if the base class is not designed with subclassing in mind then overriding methods can result in unintended behavior (e.g. crashing, or other bugs).
>> But I think the counter argument is, what if you need to fix or workaround unintended behavior of the class you’re trying to use?
> Typically you modify something open source - 99% of which is on GitHub. IMHO the best way is to either fork it and perhaps submit a pull request with the fix.
> But I understand that this is not always possible...
I am a professional dev, and i rarely have the time (or even the legal right) to push back the changes i make to public code... the objc world is IMVHO very far from the professional open source culture that exists around other languages... so far the swift world is very embryonic. Sealing by default looks to me like a miss judgement of the maturity of the ecosystem.
>> swift-evolution mailing list
>> swift-evolution at swift.org
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution