Terug naar de gemeenschap
u/isavandermeer
10mnd geleden

Is Temporal really better than Date, or just different pain points?

Been seeing this take everywhere lately and honestly... I'm not convinced the tradeoff is worth it for most projects.

Yes, Date has issues - timezones are a nightmare, mutability causes bugs, the API is confusing. We all know this. But Temporal's solution is to basically create an entirely new mental model for time handling. Which means:

  • Your whole team needs to learn it (good luck with contractors)
  • Legacy code stays messy anyway
  • Library support is still spotty outside the main ecosystems
  • You're adding significant bundle size for what... 5% of your codebase that actually deals with complex time operations?

Maybe I'm just tired of chasing the "new better way" every few years. Sometimes the devil you know is easier to work with than rewriting your validation layer, refactoring date pickers, and explaining to stakeholders why we need extra sprint time for a refactor.

What are people actually shipping with Temporal that couldn't be done with date-fns or Luxon?

1
4

Reacties

Houd de discussie feitelijk, duidelijk en gemakkelijk te volgen.

4
Log in om deel te nemen aan de discussie
Reageer, sla op en volg de thread zodra u bent ingelogd.
C

Honestly I've been going back and forth on this too. I tried switching one project over and yeah the bundle size thing hit me immediately - was like 70kb just for date handling when the old setup was maybe 15kb with date-fns. What really got me though was debugging... when something goes wrong with Temporal types it's this whole investigation into which temporal object you're dealing with, whereas Date bugs are usually pretty obvious even if annoying. I get that it's "better" architecturally but sometimes the devil you know beats learning a whole new system that half your dependencies don't even support yet.

1
E

The mental model thing is real but I wonder if it's actually harder than learning all the Date quirks we pretend are "intuitive" because we're used to them. Like how many devs can honestly explain off the top of their head why new Date("2023-01-01") behaves differently than new Date(2023, 0, 1) without looking it up? Maybe the steeper learning curve of Temporal is actually worth it if the rules are at least consistent once you get them.

1
K

The bundle size argument keeps coming up but I'm more concerned about the transitive dependency problem nobody mentions. If you commit to Temporal in your core code but then pull in third-party libraries that still use Date internally, you end up maintaining conversion layers at every boundary. I ran into this with a calendar integration library - perfectly good code, but it returns Date objects, so now I'm wrapping everything in Temporal.Instant.from() calls scattered throughout the codebase. At some point you have to ask whether the consistency benefits actually materialize when half your dependencies haven't made the switch. The ecosystem fragmentation might be a bigger problem than the learning curve.

1
C

Look, I spent forty years timing soufflés and coordinating kitchen shifts across breakfast-lunch-dinner services, so maybe I'm just old and stubborn, but this whole debate feels like when molecular gastronomy hit and everyone suddenly needed liquid nitrogen for everything. Sometimes the "clunky" tool is clunky because time itself is genuinely weird and messy - leap seconds exist, politicians change timezones on a whim, and your code runs on servers that might be set to UTC or might be set to wherever the hell the hosting company felt like. Is Temporal hiding that complexity or just moving it around? Because in my experience, when you can't see the mess, you can't smell when something's burning until it's too late.

1