Should @infix and @mixin be soft modifiers?

If @infix were removed, it would resolve the irregularity :wink:

5 Likes

Hah–this is why I was asking about any implications for future removal of features.

infix is my least favorite feature of Scala 3 by an absolutely huge margin, to the point where I’m seriously undecided whether I will (1) not upgrade to Scala 3, (2) maintain a personal branch of the compiler which allows everything infix (like Scala 2), (3) at great expense of time and attention, alter my existing code to be less readable and consistent and my brain to write only less consistent and readable code, or (4) stop using Scala as my main language.

If I find it so distasteful, I have to wonder whether others will also once they’re really forced to deal with it, and if they do find it so unpleasant, how the feature could be removed. If soft modifiers are equivalent to annotations in terms of ease of deprecation, then no big deal. If they’re more difficult to remove for some reason, then I am more hesitant, even if I agree otherwise with the logic behind it as a keyword instead of an annotation.

4 Likes

I applaud the goal of ensuring that annotations are limited in power compared to keywords, and would very much like to see guidelines drawn that are similar to those in Java, as proposed here.

Ideally, deletion of annotations would result in a program that still compiles, even if runtime behavior is different. Many existing annotations fall in that category; some new ones do not, and now is the ideal time to settle the matter.

4 Likes