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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -