News for hackers. Stuff that matters.
Re:Please put units in names by osigurdson on Monday March 21, 2022 @02:49AM (#30751008)
What precisely could have been changed to make you realize that C# DateTime is not the same as Unix time? Perhaps Ticks could be renamed to Ticks100ns but I'm not sure how to encode the epoch date such that it is not necessary to read any documentation. I suppose the class could have been named something like DateTimeStartingAtJan1_0001 but obviously would have been ridiculous.

Naming is an optimization problem: minimize identifier length while maximizing comprehension.

Re:Please put units in names by justsomehnguy on Monday March 21, 2022 @03:00AM (#30751059)
> how to encode the epoch date such that it is not necessary to read any documentation

And you need to read the docs to know why some systems use 1970 as the reference point. Should we rename it to Unix1970datetimeepoch everywhere?