musictheory / NilScript

Objective-C-style language superset of JavaScript with a tiny, simple runtime
Other
50 stars 5 forks source link

3.0: Error instead of ignoring unknown property attributes #148

Closed iccir closed 6 years ago

iccir commented 6 years ago

Right now, the following property attributes are silently ignored:

  1. assign, retain, strong, unsafe_unretained, weak
  2. atomic, nonatomic
  3. nonnull, null_resettable, null_unspecified, nullable

The first set never makes sense since JavaScript is garbage collected. The second set never makes sense since JavaScript is single-threaded. The third set might make sense in the future if we decide to take advantage of TypeScript's --strictNullChecks feature.

Rather than silently ignoring these, we should emit an error.