Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

using keyword instead of //> using? #21703

joan38 started this conversation in General Discussion
Discussion options

This is following a discussion on Discord about //> using in scala

Hi,

Sounds like there is no plan of having the top level using keyword excluded by the language spec.
Meaning //> is necessary in front of using with no plan of changing this.

I for any Scala dev that knows the context and history on why the //>, it make sense. But for any new comer to Scala it's kind of weird to have to do //>.
Most people will not understand the difference between scalac and scala.
If the compiler (scalac) needs to ignore the top level keyword using, we should do it instead of relying on some commented (but not really) code.
The //> feels like a temporary hack that we should be looking to resolve soon.

Thanks

You must be logged in to vote

Replies: 1 comment

Comment options

We've had a lot of discussions about it and the comment was good enough to work across all Scala versions and not break all the tooling at the same time.

We could at some point do this only for Scala 3, though it would make it incompatible with Scala 2.

I think what is missing is someone to push first the discussion and then the SiP through, since the current solution is good enough and hasn't caused a lot of issues.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /