scala-dev icon indicating copy to clipboard operation
scala-dev copied to clipboard

prepare for the eventuality of indentation based syntax

Open adriaanm opened this issue 6 years ago • 7 comments
trafficstars

Scala 3 will have a few syntax "tweaks" -- we should already provide warnings in the 2 series where possible.

In general, I'm in favor of warning about things that don't make sense even without considering the 3.0 upgrade. For indentation, that would include:

  • [ ] accidental de-indent without closing brace
  • [ ] ....

adriaanm avatar Nov 05 '19 12:11 adriaanm

@smarter, what was the other warning requested in the meeting?

adriaanm avatar Nov 05 '19 12:11 adriaanm

I don't remember a specific warning coming up ?

smarter avatar Nov 05 '19 12:11 smarter

Is this already decided? No hope for SIP committee to veto it?

neko-kai avatar Nov 06 '19 01:11 neko-kai

It's still possible. This is just the subset of things that the new syntax would need of Scala 2 and make sense even without a new syntax in Scala 3.

dwijnand avatar Nov 06 '19 06:11 dwijnand

Is this already decided? No hope for SIP committee to veto it?

This issue is meant to be independent of that, because the idea is to limit ourselves to improvements that will improve the Scala 2 experience.

[...] warning about things that don't make sense even without considering the 3.0 upgrade

In the one example I mentioned above, the idea would be to take the information encoded in indentation to give better warnings when a user forgets a closing brace/paren.

adriaanm avatar Nov 06 '19 10:11 adriaanm

I think the confusion stems from the use of "eventual" in the title which usually means "inevitable" in English but which I assume Adriaan used to mean "possible" because of the false friends https://en.wiktionary.org/wiki/eventueel#Adverb / https://en.wiktionary.org/wiki/%C3%A9ventuel#Adjective ;).

smarter avatar Nov 06 '19 15:11 smarter

https://www.merriam-webster.com/dictionary/eventuality

adriaanm avatar Nov 06 '19 15:11 adriaanm