musictheory / NilScript

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

3.0: Overview and Umbrella #141

Open iccir opened 6 years ago

iccir commented 6 years ago

One of the themes of NilScript 3 is "oj grows up, changes its name, and becomes its own language."

While making conversion of Objective-C code to NilScript is still a major use case, mirroring the Objective-C syntax exactly has become less of a priority over time compared to oj 0.x.

Do to the evolution of the language, some things no longer make sense: Why do ivars use C-style syntax when @type uses TypeScript style? Why do we have @interface syntax in the @implementation block? Should we allow non-operational attributes like retain on @propertys? Why do we have two different syntaxes for @cast? There are also a lot of language features that were used in 0.x and 1.x, and haven't been used since. These can likely be dropped.

Another theme is compatibility with future versions of ECMAScript. What do we do once Decorators use the @ syntax?

iccir commented 6 years ago

Additional assumptions we are making with 3.0:

1) Users will use the Compiler#uses and Compiler#compile API. This will allow the compiler to see the entire source base and make optimizations as needed. 2) Users will use a linter on the generated JavaScript. This allows us to remove code which duplicates common linter features (See #154). 3) Users will use the typechecker.