Skip to content

Dotty uses SIP-12 syntax in output and input #4599

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
Blaisorblade opened this issue May 30, 2018 · 6 comments
Closed

Dotty uses SIP-12 syntax in output and input #4599

Blaisorblade opened this issue May 30, 2018 · 6 comments

Comments

@Blaisorblade
Copy link
Contributor

Blaisorblade commented May 30, 2018

I noticed in a #4563 comment that RefinedPrinter only uses SIP-12 syntax in output, even tho that SIP was rejected. That syntax is also accepted in input, which would still be a problem for tool authors trying to support Dotty. I couldn't dig any mention of SIP-12 in the commit logs (but only tried git log -S SIP-12 and git log -G SIP-12).

Apparently the SIP was born in 2011 and only rejected in 2016 (https://docs.scala-lang.org/sips/minutes/2016-08-16-sip-10th-august-minutes.html), so it shouldn't be surprising this is still in.

Example using while...do:

sbt:dotty> repl
scala> var i = 0; while i < 5 do { i += 1; println(i) }
1
2
3
4
5
var i: Int = 5
@SzymonPajzert
Copy link
Contributor

What is the status of this ticket? I've seen in syntax doc that ‘if’ Expr ‘then’ Expr [[semi] ‘else’ Expr] is allowed syntax. Should it be removed as well, since it was proposed in SIP-12?

@Blaisorblade
Copy link
Contributor Author

Blaisorblade commented Aug 5, 2018

@SzymonPajzert Exactly. We have been busy, but we should certainly remove the syntax (both from the pretty-printer and the parser) to honor the SIP decision.
I don't think there's other activity on RefinedPrinter, except for #4072.

@allanrenucci
Copy link
Contributor

allanrenucci commented Aug 5, 2018

I'll would ask @odersky first, before removing anything. I've seen him use the syntax in some of our tests

@Blaisorblade
Copy link
Contributor Author

Blaisorblade commented Aug 14, 2018

So while SIP-12 was rejected for Scala 2, Martin would still like to revive it. (checked with him today).

@Blaisorblade
Copy link
Contributor Author

So I'm putting the issue on hold with stat:revisit. Sorry @SzymonPajzert for the noise!

@SzymonPajzert
Copy link
Contributor

No problem, 356 to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants