You can do anything in a trait definition that you can do in a class definition, and the syntax looks exactly the same, except:
a trait cannot have any “class” parameters
[behaviour?]
Answer
whereas in classes, super calls are statically bound, in traits, they are dynamically bound.
Tags
#odersky-programming-in-scala-2ed #scala
Question
You can do anything in a trait definition that you can do in a class definition, and the syntax looks exactly the same, except:
a trait cannot have any “class” parameters
[behaviour?]
Answer
?
Tags
#odersky-programming-in-scala-2ed #scala
Question
You can do anything in a trait definition that you can do in a class definition, and the syntax looks exactly the same, except:
a trait cannot have any “class” parameters
[behaviour?]
Answer
whereas in classes, super calls are statically bound, in traits, they are dynamically bound.
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it You can do anything in a trait definition that you can do in a class definition, and the syntax looks exactly the same, except:
a trait cannot have any “class” parameterswhereas in classes, super calls are statically bound, in traits, they are dynamically bound.
Original toplevel document (pdf)
cannot see any pdfs
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.