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

Rename unused to ghost #4061

Merged
merged 1 commit into from
Mar 2, 2018
Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@allanrenucci
Copy link
Contributor

Any chance to pick another name, maybe even before the release, since apparently nobody likes unused?

I wouldn't make such a claim. Only one person complained which for me is more a sign that the name is not that controversial.

Personally, I prefer unused. I would discuss this a little more before settling on a new name. Maybe create a new topic in https://contributors.scala-lang.org/

@nicolasstucki
Copy link
Contributor Author

I would change it to ghost as it is less controversial and does not clash whit any other concept we have in the language. It also highlights the link with phantom types. We can later create a topic on it to see which keyword should be used.

Copy link
Contributor

@Blaisorblade Blaisorblade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — both the changes and the strategy. Thanks for the prompt PR!

Given the size of the rename, I looked at current occurrences of unused, and comparing them with the ones before unused was merged. I used
vimdiff <(git grep unused compiler) <(git grep unused 2a85106974ce5620eabbf4658810ddb917465145 compiler), and inspecting the output of git grep unused.

I like the strategy — either way we might still change the name, but at least the one we use has no obvious blockers.

I wouldn't make such a claim. Only one person complained which for me is more a sign that the name is not that controversial.

"Nobody" was hyperbole, but based on comments by both Martin and IIRC Nicholas (apart from me).

@Blaisorblade Blaisorblade merged commit 3ddc262 into scala:master Mar 2, 2018
@Blaisorblade Blaisorblade deleted the rename-unused branch March 2, 2018 10:54
@Blaisorblade
Copy link
Contributor

I just merged this, also to unblock the release (let me know if I was too hasty).

For future discussion: the concept of "ghost" is also used by Liquid Haskell (and maybe @gsps's Liquid Scala), but for essentially the same thing: values that don't exist at runtime.

So maybe @gsps is also interested?

@biboudis
Copy link
Contributor

biboudis commented Mar 2, 2018

It is also related to F*'s Ghost monad and erased type (Sec. 4).

https://www.fstar-lang.org/papers/mumon/paper.pdf

@joan38
Copy link
Contributor

joan38 commented Mar 2, 2018

@allanrenucci Have you seen the poll: https://goo.gl/forms/UD44AfLUD3dkfnxs2 ?

Blaisorblade added a commit to dotty-staging/dotty that referenced this pull request Mar 4, 2018
Blaisorblade added a commit to dotty-staging/dotty that referenced this pull request Mar 4, 2018
Blaisorblade added a commit to dotty-staging/dotty that referenced this pull request Mar 4, 2018
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 this pull request may close these issues.

None yet

5 participants