Re: [w3ctag/design-reviews] Temporal proposal (#311)

@cynthia, @kenchris, and I discussed this in our VF2F today. 

Since there is no explainer but only documentation & the spec, we missed a list of user needs, which would facilitate review. 

However, based on the documentation, we are concerned that while powerful, this API is very difficult to use for simpler use cases (see [principle of Least Power](https://w3ctag.github.io/design-principles/#simplicity)).

One source of cognitive overhead is the deep hierarchy of objects, the distinction between which is based on what information is available (e.g. day+month vs day+month+year vs month+year or types without a timezone and types with a timezone). Not only does this mean that when objects are constructed based on incremental user input, the developer will need to continuously convert between types, but it also forces the API to promote factory methods for object creation which need to be learned separately, as opposed to constructors. We were wondering about the reasoning behind this decision, compared to a single object, with some of its information `undefined` or `null`. 

While reviewing, we also spotted a typo in your documentation: in the [example here](https://tc39.es/proposal-temporal/docs/index.html#Temporal-Duration) the unit is probably `"seconds"`, not `"minutes"`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/311#issuecomment-768948852

Received on Thursday, 28 January 2021 10:16:35 UTC