Skip to content

Added another use-case for the prefix types SIP #942

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

Merged
merged 13 commits into from
Dec 5, 2017
Merged
5 changes: 4 additions & 1 deletion _sips/sips/2017-10-25-adding-prefix-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permalink: /sips/:title.html
| ------------- | ---------------------------------------- |
| Oct 25th 2017 | Split prefix types from [SIP33](http://docs.scala-lang.org/sips/priority-based-infix-type-precedence.html), and emphasize motivation |
| Nov 29th 2017 | Updated SIP according to feedback in the PR, and recent update to SIP23 |

| Dec 1st 2017 | Added another use-case for prefix type `~` |

Your feedback is welcome! If you're interested in discussing this proposal, head over to [this](https://contributors.scala-lang.org/t/sip-nn-make-infix-type-alias-precedence-like-expression-operator-precedence/471) Scala Contributors thread and let me know what you think.

Expand Down Expand Up @@ -60,6 +60,9 @@ It is easier to reason about the language when mathematical and logical operatio

### Motivating examples

#### Splice prefix types for meta-programming
A requirement for `unary_~` is described by Martin Odersky at [this proposal](https://gist.github.com/odersky/f91362f6d9c58cc1db53f3f443311140).

#### Singleton-ops library example

The [singleton-ops library](https://github.com/fthomas/singleton-ops) with [Typelevel Scala](https://github.com/typelevel/scala) (which implemented [SIP-23](http://docs.scala-lang.org/sips/pending/42.type.html)) enable developers to express literal type operations more intuitively.
Expand Down