Hacker News new | past | comments | ask | show | jobs | submit login

> Significant indentation and optional braces

And this is why it's annoying to use Scala. They just decided to rewrite the syntax of the language




Like many seasoned Scala developers I was skeptical at first but it's actually pretty enjoyable despite a few inconsistencies. Jumping between Scala 2 and 3 codebases isn't much of a problem. Granted, it makes the life of people working on tooling significantly more complicated but I'm not one of them.

The decision was directly motivated by Odersky's experience teaching Scala to students for 15+ years, it wasn't made for the sake of fueling drama in the community.


In Scala, eg 2.13 is a major version. Scala 3 is like a super-major version and still it's backwards compatible with 2.13: the new syntax is fully optional.

Which languages don't make any changes to syntax over major versions?


I'm not against syntax changes, but significant indentation seems like an insane choice to make. That's been a thorn in the side of Python for decades. Even if some people do like the look of it, it doesn't seem worth the tradeoffs.


I like significant indentation.

If you lose indentation, I want your code to break. It's a feature not a bug!

I'm not a big fan of Python, but significant indentation certainly doesn't seem to have hurt its adoption much...


I believe that significant indentation is only a problem for people whose text editor Tab binding doesn't handle it for them? At least, I've used Python for 15 years and can't think of a problem it's caused me -- what problems are you aware of? It's similar to the people who complain about lisp but are pairing up parens manually. I think the solution in both cases is "don't do that" -- there are perfectly good text editors that do these things for you.


Copying and pasting code after a conditional block.


It’s not a problem for Haskell and Scala is closer to Haskell.


I like significant indentation, it stops your coworkers from making up "new innovations" in how many spaces belong in a tab.


I've always just added a git hook that runs the auto-formatter before they commit when I've coded on teams. Much more "strict" than even python is when it comes to coding standards.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: