The way that extension are implemented is overly complex. In Scala 3, extension methods can be declared directly on type classes. There is no need to have separate syntax imports to bring extension methods in to scope.(I haven't actually used this myself, as all my projects are still supporting Scala 2, so I'm not aware of any limitations on this.)
Other misc issues with extension methods:
I think withDefault (for Color) and startingWtih (for Int) mean the same thing. Just choose one name. withDefault is clearer to me.
The way that extension are implemented is overly complex. In Scala 3, extension methods can be declared directly on type classes. There is no need to have separate
syntax
imports to bring extension methods in to scope.(I haven't actually used this myself, as all my projects are still supporting Scala 2, so I'm not aware of any limitations on this.)Other misc issues with extension methods:
withDefault
(forColor
) andstartingWtih
(forInt
) mean the same thing. Just choose one name.withDefault
is clearer to me.Choice
doesn't have any extension methods.