<div dir="ltr">I’m building a fairly large app for macOS, and its not uncommon for a view/view controller subclass to implement 10-20+ NSResponder methods. I like to separate these methods from other logic/layout code. At the moment, I’d break out my code into individual files like this:<br><br>TestViewController.swift<br>TestViewController+NSResponder.swift<br>TestViewController+…<br><br>class TestViewController: NSViewController {<br><br>}<br><br>extension TestViewController {<br><br>}<br><br>The problem is: when I try to introduce generics to the subclass, the compiler complains about limitations on @objc extensions. The only workaround is to concatenate everything into a larger file, which I’d rather not do. Would it be possible to introduce a simple way to have the compiler concatenate declarations for us? Probably creates more problems that it solves, but worth mentioning. E.g:<br><br>class TestViewController: NSViewController {<br>    func foo() { }<br>}<br><br>class TestViewController (continued) {<br>    func bar() { }<br>}<br><br>Concatenates into:<br><br>class TestViewController: NSViewController {<br>    func foo() { }<br>    func bar() { }<br>}<br><br>Alternate syntax:<br><br>continued class TestViewController {<br>    func bar() { }<br>}<br><br>Slightly more exotic:<br><br>TestViewController.Type += class {<br>    func bar() { }<br>}</div>