|
|
|
|
|
by bonesss
25 days ago
|
|
> WTF is Z? Take a person, add a job, you get an Employee or EmployedPerson. Person.add(job). I agree overloading can create footguns, but domain concepts should make a lot of sense in context when basic arithmetic operations are performed on them. Party = Meeting + Booze. Custom operators are a big assistance for DSLs, and overloading can also aide their creation and elegance. Part of the “awesome but don’t be a jerk about it” toolbox. |
|