I was originally more opinionated but I’m now of the opinion that whether we choose
with wont really matter. They both work for slightly different reasons and after a while, we’ll all just get used to it and not even really see it anymore.
I think the bigger problem is with consistency from a users point of view. Whatever style we choose for
object should also be applied to
extension blocks. I know from the compiler author’s point of view there’s some objection in that the semantics are slightly different, I think @odersky doesn’t consider an
extension block as being “a new scope” where as he does with
class. From at user’s point of view (at least from my perspective), they’re all the same. To me a indented block is a new scope and if it’s technically not, I don’t really care (nor do I think users in general are going to care either). I think both Scala beginners and Scala veterans would find it easier and more regular to just remember to use one style (
with) to mark a line as having an indented body. Trying to remember that
extension blocks need to be declared differently than
class blocks because of some implementation detail that isn’t important to me is a situation I hope we can avoid.
Of course there’s always the danger that when one tries to speak for many based on personal intuition there’s a chance you’re completely misrepresenting the many. Please chime in if you disagree or maybe like if you agree. I’ve come to believe that this decision is going to be more impactful than