Skip to content

Rename language.Scala2 #6291

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

Closed
odersky opened this issue Apr 11, 2019 · 4 comments
Closed

Rename language.Scala2 #6291

odersky opened this issue Apr 11, 2019 · 4 comments

Comments

@odersky
Copy link
Contributor

odersky commented Apr 11, 2019

The Scala2 language option is misleading. On several occasions I met people who had the impression that it would be a mode where Scala 2 is fully supported but none of the Scala 3 features would be accepted. This is not what it is, of course. So I propose to rename to
s2compat. I.e.

 -language:s2compat

as a command line option and

import language.s2compat

as an import.

@OlivierBlanvillain
Copy link
Contributor

I agree that the current name is misleading but I think I would prefer scala2compat over s2compat.

Also I have a feeling that we should put this under a dedicated flag instead of it being a language feature. For instance, its quite surprising that -language:_ enables the compatibility mode.

nicolasstucki added a commit that referenced this issue Nov 15, 2019
Fix #6291: Rename Scala2 language setting to Scala2Compat
@odersky
Copy link
Contributor Author

odersky commented Nov 18, 2019

I believe anybody using -language:_ gets what they asked for :-)

@smarter
Copy link
Member

smarter commented Nov 18, 2019

We should just remove support for -language:_, it doesn't mean anything useful. But even then, I think it's strange that some -language flags just turn off warnings whereas others change the semantics of the language (and are therefore much more dangerous), I think we should clearly separate these two sets of options, in particular turning off language warnings should look like turning off any other kind of warning (something like the -Wno-xxx options in clang/gcc ?)

@som-snytt
Copy link
Contributor

My newly teenaged child advises me that -language:_ means "leave me alone!" Also, if you put underscore on both ends, you get leave me alone! That is, don't hassle me about features, or in pipe organ lingo, "pull out all the stops."

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

No branches or pull requests

4 participants