3 ms·
I get that the naming Temporal is used for avoiding conflicts with typical time objects like Moment, Datetime, etc. But isn't it a terrible name? At first glanc
by manbitesdog 2y ago
I get that the naming Temporal is used for avoiding conflicts with typical time objects like Moment, Datetime, etc. But isn't it a terrible name? At first glance I thought it was some kind of garbage collection control
- imdsm 2y agoI also think it's a terrible name. I'd even take DateV2 over this. I get they need backwards compatibility but Temporal sounds terrible. DateTime isn't by standard part of JS so why not use that? Until then const DateTime = Temporal
- shawabawa3 2y agoI thought it was Temporal the workflow engine in the browser
- reddalo 2y agoI agree, the naming is unfortunate. DateTime would have been way better.
- Eric_WVGG 2y agoI like it. got a Star Trek vibe.
- cosiiine 2y agoThere's even the concept of "Temporal Dead Zone" in Javascript already which describes the period of time where variables aren't accessible.
- sensanaty 2y agoIt sounds kinda cool and sci-fi-ey, but yeah I have a feeling I'm gonna struggle remembering the name of this new API lol
- Thorrez 2y agotemporal > 1. of or relating to time as opposed to eternity > 2. of or relating to grammatical tense or a distinction of time > 3. of or relating to time as distinguished from space https://www.merriam-webster.com/dictionary/temporal https://www.merriam-webster.com/dictionary/temporal Sounds like a good name to me.
- spelunker 2y agoI thought it was about the distributed async task framework!
- LordDragonfang 2y agoWhile I love that javascript has been taking features from popular libraries (read: jquery) and integrating them into vanilla, I do despair a little that every time it does so with a much more verbose and annoying invocation.
- WorldMaker 2y agoThere are only 2 hard problems in software engineering: naming things, cache invalidation, and off by one errors.
- russellbeattie 2y agoWe're definitely bike-shedding a decision that has already been made, but I agree that it's a horrible name. First, "Temporal" is an adjective, not a noun. It might be related to time, but it doesn't make intuitive sense. But more importantly, choosing an odd name because it has a lower probability of conflicting with old code will just make the language increasingly obscure over time. When they added Promise and Generator, there were plenty of libraries that used those object names. It didn't matter, because unlike reserved keywords, you can override built-in Objects. In my opinion the standards committee needs to have backbone and do the right thing for the long-term health of the language and use "Time". But again, I'm sure this argument has come and gone and the decision has been made and agreed upon by all the browser makers and JS engine implementations.
- 8n4vidtmkvmk 2y agoI don't think you create Temporals though. It's essentially a namespace for things like Instant, so it need not be a noun. Time has the opposite problem. I expect it to be a class, not a namespace. Time.Time creates more confusion, not less.
- agos 2y agoBoolean is also a built in named after an adjective, and we deal with it just fine :) Temporal is not "odd", it's just a bit less common in english that many people are used to