Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find better names for traits TypeOrder, TypeArithmetic and TypeRangeStep #25440

Closed
nalimilan opened this issue Jan 7, 2018 · 2 comments · Fixed by #25555
Closed

Find better names for traits TypeOrder, TypeArithmetic and TypeRangeStep #25440

nalimilan opened this issue Jan 7, 2018 · 2 comments · Fixed by #25555
Milestone

Comments

@nalimilan
Copy link
Member

nalimilan commented Jan 7, 2018

As discussed at #25402 (comment) and #20402 (comment), we should find better names for traits defined in traits.jl, since they are the only ones whose names start with Type. Here's a list with suggestions:

  • TypeOrder (possible choices: HasOrder/Unordered) -> OrderStyle (Ordered/Unordered), HasOrder (Ordered/Unordered) or IsOrdered (Ordered/Unordered)
  • TypeArithmetic (ArithmeticRounds/ArithmeticOverflows/ArithmeticUnknown) -> ArithmeticStyle or ArithmeticAccuracy (BTW, it would make sense to add ArithmeticExact and divide overflow into ArithmeticWrapsAround/ArithmeticSaturates.)
  • TypeRangeStep (RangeStepRegular/RangeStepIrregular) -> RangeStep or RangeStepStyle
@nalimilan nalimilan added the triage This should be discussed on a triage call label Jan 7, 2018
@nalimilan nalimilan mentioned this issue Jan 7, 2018
19 tasks
@StefanKarpinski
Copy link
Sponsor Member

I like using the Style suffix consistently:

  • OrderStyle: Ordered, Unordered and in the future possibly PartiallyOrdered.
  • ArithmeticStyle: ArithmeticRounds, ArithmeticWraps (I assume that's what ArithmeticOverflows means), ArithmeticUnknown, and future possibly ArithmeticSaturates.
  • RangeStepStyle: RangeStepRegular, RangeStepIrregular.

@StefanKarpinski
Copy link
Sponsor Member

Triage likes the -Style suffix names. Not all traits need to end in style, but it seems like a good pattern.

@StefanKarpinski StefanKarpinski added this to the 1.0 milestone Jan 11, 2018
@StefanKarpinski StefanKarpinski removed the triage This should be discussed on a triage call label Jan 11, 2018
JeffBezanson added a commit that referenced this issue Jan 14, 2018
JeffBezanson added a commit that referenced this issue Jan 14, 2018
also rename `HasOrder` to `Ordered` and `ArithmeticOverflows` to
  `ArithmeticWraps`
JeffBezanson added a commit that referenced this issue Jan 15, 2018
also rename `HasOrder` to `Ordered` and `ArithmeticOverflows` to
  `ArithmeticWraps`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants