kuyawa / MarkdownEditor

Markdown Editor in Swift
37 stars 5 forks source link

Move NSTextStorageDelegate to an extension #2

Open neoneye opened 7 years ago

neoneye commented 7 years ago

IMHO Instead of

class ViewController: NSViewController, NSTextStorageDelegate {

Then do

class ViewController: NSViewController {
    // ...
}
extension ViewController: NSTextStorageDelegate {
    func textStorage()
}
kuyawa commented 7 years ago

Good point but since the extension is just one little function in this particular case I'm leaving everything in one place. If the project ever grows then I'll start to refactor everything moving all pieces to their individual classes as I usually do.

Thanks for the tip.