Mar. 24th, 2019

juan_gandhi: (Default)
 Ни то, ни другое к печени отношения не имеет. Первое - deliberate, освобождение. Второе - избавление от забот.
juan_gandhi: (Default)

if your class is not a function of its constructor parameters (like, e.g., case class is), don't introduce these parameters at all. Make them members. Use a factory to build your class.

Then you can turn them into traits, and compose them freely. That's just one advantage.

The other advantage is that you won't need to reassign parameter values to members that are already declared in traits.

In short, careful with constructors. You may not need them. Scala is not C++, you know. 

juan_gandhi: (Default)

Голубенькие цветочки


Вид в сторону нашего дома (он за холмом)


Видите обсерваторию на горе Хамилтон? А она есть.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

October 2025

S M T W T F S
    1 23 4
5 678 9 1011
12 13 1415 161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 17th, 2025 04:20 am
Powered by Dreamwidth Studios