Pascal How
01/23/2018, 6:37 PMobject
and lazy
You can create a singleton by using object
and similarly with lazy
, you can assign a value to a val and all future references to that val will hold the initial value. So what is the difference? I read that with object
you cannot have a constructor