scala - Difference between Traits? -
is there difference between these 2 trait
's?
scala> trait bar[a <: foo] { | def bippy(x: a): | } defined trait bar
and
scala> trait bartwo { | type <: foo | | def bippy(x: a): | } defined trait bartwo
edit:
the difference in names not meaningful difference per question. i'm looking difference between these 2 trait
constructs.
in practical cases, there no difference, , @akoskrivachy commented, scheduled made equivalent. nevertheless, while the official documentation states
it possible turn abstract type members type parameters of classes , vice versa.
it states @ end that
furthermore, there cases not possible replace abstract types type parameters.
sadly, not find description of cases :-(
i'm posting answer in case given better answer might not forthcoming , might want close this, let's hope.
Comments
Post a Comment