I agree with the general sentiment that the new syntax for given
definitions (without as
) is far superiod to the old one. Not perfect, but the old one honestly wasn’t great (entirely new and unfamiliar, unnecessarily inconsistent with the status quo, claiming new keywords that were already pretty common)
I also agree with @soronpo that do
is the ideal block delimiter. Short, already a keyword, generally unused (and trivially re-writable), semantically relevant, entirely unambiguous. As I have mentioned in the other thread, “zero required braces” is the standard to aim for. As much as I like :
(as a Python dev) I don’t think it quite reaches that level for Scala. Like it or not, multi-line lambdas are widely considered impossible in Python explicitly due to their choice of indentation-based syntax, while multi-line lambdas are extemely common in Scala.
I also agree with @oscar that leaving @
unchanged is for the best. Any change we make must not only be superior to the status quo, it must be sufficiently superior that:
- It pays for the migration cost. This is significant, regardless of automated fixes or not. People’s brains and old blog posts and books in libraries or Scala notebooks in a SQL database are not amenable to Scalafix
- We are confident we will not find a trivially-better alternative anytime soon. We cannot afford the churn of changing a major syntactic feature more than once in the foreseeable future (5-10 years?). If a change is good, but blocks off a better alternative that may appear, then it’s better to hold off. We can pull the trigger when (a) the better alternative appears or (b) we are confident a better alternative isn’t going to appear
IMO @
isn’t great, but neither is it a major factor in someone’s experience using the Scala language, and we can always make the change later as long as there’s a proper migration period.