Scala

Scala

Made by DeepSource

Consider using ? for wildcard arguments in types instead of _ in Scala 3 SC-R1077

Anti-pattern
Major

The underscore token was used for wildcard arguments in types in Scala 2. However, beginning with Scala 3, it is recommended that you use the question mark token instead. While the old syntax is still supported, it will be dropped in the future Scala 3 versions.

Bad Practice

List[_]

Recommended

List[?]

Reference