News for hackers. Stuff that matters.
Re:Jiff: A brand new Datetime library for Rust, from the aut... by Smaug123 on Tuesday July 23, 2024 @04:25AM (#41043864)
Is that relevant? If my philosophy is weak, you can prove it to be weak by providing me with an example of a library which conforms to a better philosophy; then I can see why it's better.
Re:Jiff: A brand new Datetime library for Rust, from the aut... by GoblinSlayer on Wednesday July 24, 2024 @04:34AM (#41054853)
Everybody thinks their philosophy is the best. Take for example C89 time library. You'll just say it doesn't satisfy your philosophy.
Re:Jiff: A brand new Datetime library for Rust, from the aut... by Smaug123 on Wednesday July 24, 2024 @12:27PM (#41058719)
I won't just say it doesn't satisfy my philosophy. I'll say additionally that the .NET standard library's `DateTime` type, which I believe is essentially the same and uses basically the same primitives, is so hard to use correctly that I have multiple times had to rewrite other people's programs, in one case completely from the ground up, to fix their correctness due to bugs I personally encountered in them in real life. I do have empirical evidence for some of my opinions, you know!

Time handling is one of the many cases where there is actually complexity in the domain, and if you refuse to model the complexity, that doesn't make the complexity go away; it just means you've got bugs.

Re:Jiff: A brand new Datetime library for Rust, from the aut... by GoblinSlayer on Thursday July 25, 2024 @08:28AM (#41067851)
I only saw DateTime.Now where StopWatch should be used and serialization inconsistency due to discrepancy in time zone database.
Re:Jiff: A brand new Datetime library for Rust, from the aut... by Smaug123 on Friday July 26, 2024 @05:33PM (#41082501)
So it's famously difficult to write a correct date-time handling program, but my empirical observation is that it's considerably easier with a library like Noda Time which actually attempts to model some of the domain beyond "ticks since the epoch".
Re:Jiff: A brand new Datetime library for Rust, from the aut... by GoblinSlayer on Tuesday July 30, 2024 @02:20PM (#41112421)
How noda prevents you from using utc instead of StopWatch?