Julia: Reserve keyword(s) for future trait-system now?

Created on 10 Aug 2016  路  4Comments  路  Source: JuliaLang/julia

Would it make sense to reserve keyword(s) now which maybe used in the future for traits? Doing this now would have them reserved in 1.0. Depending on the details, adding traits could then even be a non-breaking change.

If so, the question is which keyword(s). Previously discussed candidates are trait, protocol, and interface. To get first dips on the bikeshed: I think trait is nicer than the other two, and shorter for sure.

Most helpful comment

Possible Solutions:

  • Call it "Feature X" and simply reserve x as its keyword
  • Reserve a large number of vague, non-specifc keywords (floop, maugre, ebrious) and use them for whatever we want after 1.0

All 4 comments

We also discussed concept (C++) and typeclass (Haskell).

It's hard to pick a name before the thing is done and designed.

Possible Solutions:

  • Call it "Feature X" and simply reserve x as its keyword
  • Reserve a large number of vague, non-specifc keywords (floop, maugre, ebrious) and use them for whatever we want after 1.0

Whilst there is no guarantee, chances are that the trait design will work with just one extra keyword (+some other extra syntax).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ararslan picture ararslan  路  3Comments

i-apellaniz picture i-apellaniz  路  3Comments

sbromberger picture sbromberger  路  3Comments

yurivish picture yurivish  路  3Comments

helgee picture helgee  路  3Comments