News for hackers. Stuff that matters.
Re:dotNET (OK, C#) gets union types by bonesss on Sunday May 24, 2026 @03:30PM (#48260284)
> 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.

There are no comments on this comment yet.