Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian King KingOfBrian

  • Boston Massachusetts
View GitHub Profile
@KingOfBrian
KingOfBrian / overrides.md
Last active Jun 15, 2017 — forked from erica/overrides.md
Requiring Proactive Overrides for Default Protocol Implementations
View overrides.md

Requiring Proactive Overrides for Default Protocol Implementations

  • Proposal: tbd
  • Author(s): Erica Sadun
  • Status: tbd
  • Review manager: tbd

Introduction

This proposal enhances protocol implementation safety. It incorporates two keywords that cooperate with compiler checks to limit "near miss" implementation errors and accidental member overrides. This is a strictly syntactic system intended to provide greater safety at compile time, and would not affect existing compiled code bases. *** BK: Saying it does not affect implies to me that it's optional. ***

View NSObject+BlockObservation.h
//
// NSObject+BlockObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
#import <Cocoa/Cocoa.h>