Inside the module what is the different of 'public class' vs 'public type' ? #98
-
Q: Inside the module, what is the different between 'public class' vs 'public type' ? For example, public class Buffer(initCapacity : Nat) { compare to: public type List = ?(T, List); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
Type
is just that, a type declaration.class
is a way for you to declare the structure of your object, and then you can instantiate as many instances of that class as you need