Skip to content

Commit 16e0f38

Browse files
committed
Meeting notes from April 2 and April 9
1 parent 76a6acc commit 16e0f38

File tree

2 files changed

+129
-0
lines changed

2 files changed

+129
-0
lines changed

meetings/agenda-minutes-2020-04-02.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Apr 2, 2020
2+
3+
## Attendees:
4+
5+
- Ujjwal Sharma (USA)
6+
- Jase Williams (JWS)
7+
- Philip Chimento (PFC)
8+
- Philipp Dunkel (PDL)
9+
- Han Jiang (HJG)
10+
- Ms2ger (MS2)
11+
- Richard Gibson (RGN)
12+
- Shane Carr (SFC)
13+
14+
## Agenda:
15+
16+
- TC39 presentation!
17+
- We are satisfied with how it went.
18+
- JWS: I was expecting more questions.
19+
- PDL: I think people have been following it for the past few years, since I've given plenty of updates, and getting their questions answered that way. As long as we keep engaging with people, then we tend to talk about conclusions rather than issues in plenary.
20+
- PDL: I expect this podcast thing will happen in the next few weeks, so we may get more people experimenting with the polyfill.
21+
- USA: GCL suggested that we should allow non-24-hour days.
22+
- Some discussion about how far we already support that with Calendars.
23+
- Will open an issue about this if there is more to discuss.
24+
- [#387](https://github.com/tc39/proposal-temporal/issues/387) species use in from()
25+
- MS2: I have some work-in-progress on this topic, so we should land it first as well.
26+
- SFC: With the Calendar data model, from() delegates to the Calendar. If the Calendar has to decide what type it's going to be constructing, I don't see how you would make Calendar.dateFromFields() construct a polymorphic date. It would just construct the default Date.
27+
- PFC: dateFromFields could receive the constructor, or it could return a property bag.
28+
- SFC: We had a separate discussion about what type it should return, and I think it should return a Date object.
29+
- PDL: I think the original behaviour described in the issue is the expected behaviour.
30+
- SFC: I agree, but this is about dateFromFields not being able to return a polymorphic Date.
31+
- PFC: from() could also copy the Temporal.Date returned from dateFromFields into the polymorphic type.
32+
- SFC: OK, we can close the issue.
33+
- RGN: This increases the burden for virtualization. Anything that has a secret reference to a constructor has to be patched for SES, for example.
34+
- PDL: That is not correct. All the Temporal classes would remain the same across SES. What we want to disallow is data from the outside.
35+
- RGN: Is it not the case that e.g. DateTime.from has reference to data from outside Temporal, e.g. time zones?
36+
- PFC: All time zone access goes through Temporal.TimeZone.
37+
- RGN: Right, but it can't have secret access, it has to do a Get.
38+
- MS2: That's the case.
39+
- SFC: Another possibility is to give Calendar a field for DateTimeConstructor, e.g.
40+
- RGN: I don't want to go down that road if everything looks OK as is.
41+
- [#403](https://github.com/tc39/proposal-temporal/issues/403) solve enumerability with a toObject() method?
42+
- USA: What do people think of this suggestion?
43+
- SFC: I would prefer toJSON() return the object and toISOString() return the string. It would help preserve the calendar information in serialization.
44+
- PDL: How do you clearly separate inside a JSON whether a particular object is a Temporal object? With string parsing, you can easily see whether a string is an ISO 8601 string. And if you keep it as a string, then most databases can also correctly handle it as a date.
45+
- RGN: I disagree; detecting when deserializing JSON whether any given value is or is not Temporal, is equally challenging whether that value is a string or object. However, I don't think that affects the decision whether toJSON() should return a string or object. For example, if you say that anything that *can* deserialize to a Temporal.Date, *should*, then you will include things that should not be included, and that's the case regardless of strings or objects.
46+
- USA: You can pass either strings or property bags to from(), so that doesn't matter for deserialization.
47+
- PDL: I'm thinking in terms of what the typical web developer does. If you are serializing a Temporal object to send as a request payload to some backend, then an ISO string is far more convenient.
48+
- RGN: I agree, in the common case, then you probably want toJSON() to be a string, because it's probably for interchange with a remote system.
49+
- PDL: I agree with having a toObject() but I don't want toJSON() to return an object.
50+
- USA: raw() that returns a record?
51+
- SFC: getFields()?
52+
- PDL: I don't want to wait for the records proposal.
53+
- RGN: We'd want to add toRecord() later if the records proposal makes it in.
54+
- PDL: I second getFields() or toFields().
55+
- USA: Agreed. By Record I meant the generic sense.
56+
- RGN: Slight preference for getFields() over toFields().
57+
- Consensus on calling the method getFields(). It returns a new JS object whose prototype is Object, with all the fields as enumerable, writable own data properties.
58+
- Next steps for calendar
59+
- [#354](https://github.com/tc39/proposal-temporal/issues/354) How is data passed into the calendar methods?
60+
- SFC: We have Calendar.p.dateFromFields that works as expected. But when you call Temporal.Date.p.
61+
- PDL: Am I understanding correctly? Because we proxy operations into Calendar, only full Temporal objects are passed into Calendar operations, so it should throw if it gets an object that doesn't have the slots?
62+
- SFC: But how does a custom calendar access those slots? Built-in calendars would access the slots directly.
63+
- USA: With getFields()?
64+
- SFC: If you don't have getters, then they shouldn't be on getFields() (??)
65+
- PDL: We do have the guarantee that the Date object being passed into plus/minus/etc., that it has a calendar property that is identical to the calendar that it's being proxied into. So the calendar doesn't actually need to get the ISO fields.
66+
- SFC: There's still a loop, though, because (??)
67+
- PDL: I second the proposal of option 1. I would also go further and add isoHour, isoMinute, and so on.
68+
- USA: All the hours are ISO hours.
69+
- PDL: I don't think that's correct, since the day may not begin at midnight.
70+
- SFC: I agree, on DateTime and Time we'd have the isoHour, etc. fields as well.
71+
- PDL: This makes it clearer why ISO is our default, as well, because any object, no matter what calendar, has knowledge of what it is in ISO.
72+
- PFC: I'm not opposed to option 1, but the reason why I prefer option 2 is because I think the less API that we add to deal with calendars, the better. I think it will be confusing for programmers, to see year, month, day, isoYear, isoMonth, isoDay getters, when in the common case they'll be identical. We'll see code that mixes them depending on which came up first in the programmer's documentation search.
73+
- JWS: Agreed.
74+
- SFC: Is there any other type in the JS ecosystem where you pass data to a constructor and can never get it again? That seems strange.
75+
- PDL: Option 3 would be a middle ground between option 1 and option 2 in that regard.
76+
- USA: Can we get consensus on getISOFields() (slightly modified option 3)?
77+
- Consensus on getISOFields().

meetings/agenda-minutes-2020-04-09.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Apr 9, 2020
2+
3+
## Attendees:
4+
- Ujjwal Sharma (USA)
5+
- Shane F. Carr (SFC)
6+
- Philip Chimento (PFC)
7+
- Richard Gibson (RGN)
8+
- Hemanth H.M (HHM)
9+
10+
## Agenda:
11+
- Intl.DurationFormat
12+
- SFC hopes to get this to stage 2 in June and may have more time to work on it in Q2.
13+
- Next steps for calendar
14+
- [#357](https://github.com/tc39/proposal-temporal/issues/357) Should Temporal.Duration have a [[Calendar]] slot?
15+
- SFC: Build a Date with the Hebrew calendar, make a Duration with months field, and then call plus(). The arithmetic operation uses the calendar inside the Date. That means that depending on the Date that you are adding the Duration to, the result is different. Maybe it makes more sense if there's also a calendar associated with the Duration? Then when you do the arithmetic operation you would throw if it doesn't match the calendar from the Date. Date would still need to have a calendar, for the getters. This also means we use a calendar from three different sources: Date for the getters, Duration for arithmetic, and the provided one in toLocaleString, so I was wondering what people think about that.
16+
- RGN: My comment that you're referencing probably pre-dates some stabilization of calendars. Right now I'm mostly against Duration having a calendar, because it introduces the potential for conflict in arithmetic operations. If you're adding a month to a Date, I don't think it makes sense for the month to have its own calendar system. You would switch the Date into the desired calendar system, and then add the Duration. Duration is more like a "number" than any of the other types.
17+
- SFC: Good point, it's already the case in ISO that when you add a month, the actual amount of time you are adding is already dependent on the Date.
18+
- USA: Agreed.
19+
- PFC: Agreed.
20+
- RGN: What's the strongest argument that we'd have for adding a calendar slot to Duration?
21+
- USA: It would make Durations less ambiguous because "one month" would be better defined.
22+
- SFC: Another argument is that it's strange to have the same ISO date in two different calendars, add a month, and get a different ISO date out. But I don't think that's a strong argument, because arithmetic already adds a different number of days depending on the year, month, and day fields.
23+
- Consensus is to close the issue and not add a calendar slot to Duration.
24+
- [#355](https://github.com/tc39/proposal-temporal/issues/355) Should custom calendars be able to cache information on Temporal objects?
25+
- SFC: For built-in calendars, we allow a private slot to cache potentially expensive calculations. Custom calendars could write to a `_cache` property. Do we want to build a solution for this, and if so what should it be? Or do we leave it to user land?
26+
- RGN: Adding properties in user land should be discouraged, though I don't know if I want to forbid it. Custom calendars should use WeakMap for this purpose, with the Temporal object as the key.
27+
- SFC: Good solution.
28+
- USA: The calendar object could store the WeakMap in a private field.
29+
- SFC: I'll add a section to the Markdown explainer suggesting to use WeakMaps.
30+
- Volunteers to finish / review stalled pull requests
31+
- [#302](https://github.com/tc39/proposal-temporal/issues/302) what's the correct license for the repo?
32+
- USA: This contributor suggests there seem to be two licenses applying to the repo. I'm not sure that was intentional. I think I was the one who originally added the license field.
33+
- PFC: Is there any specific license that TC39 stuff is supposed to carry? Is there any reason we shouldn't just make everything under the same license?
34+
- USA: I can make everything BSD-3-clause, and see if any objections surface, any objections here?
35+
- No.
36+
- [#441](https://github.com/tc39/proposal-temporal/issues/441) pull request with win32 support
37+
- USA: Win32 support isn't a priority but since there's a pull request for it, it seems fine. It's stalled on an argument about whether to use the mkdirp package. Any opinions?
38+
- PFC: I don't care, but if I had to choose I'd choose the mkdirp package.
39+
- USA: We could also just leave the PR open if neither of the participants has asked the champions group for consensus.
40+
- HHM: Is it hard to make the current PR platform agnostic?
41+
- USA: It is already platform agnostic either way.
42+
- Can we consolidate chat channels?
43+
- USA: We have a Temporal calendar chat, and a Matrix chat room. Can we consolidate these or should we keep a separate channel for calendar chat?
44+
- SFC: This is the one I use most. I wasn't aware of the Matrix chat room. Personally I'd prefer not opening another chat window.
45+
- USA: If anyone wants to join the Matrix chat room, ping me.
46+
- Proposal: how to go about organizing the meetings.
47+
- USA: Let's use a GitHub issue to organize the meetings. That way we get links from the agenda issue to all the discussed issues and pull requests. An example is https://github.com/nodejs/TSC/issues/846 although we could be less verbose than that.
48+
- PFC: Are these meetings open to TC39 delegates?
49+
- SFC: We're an informal working group governed by the TC39 IPA. The meeting is on the TC39 events calendar which has a lot more working groups on it, which any delegates / invited experts can join. Personally I don't think it's worth the extra trouble of putting the agendas on GitHub since we're an informal group. Tagging issues with the issue label works fine.
50+
- USA: Sounds good. We just have to have a good process for checking the notes into the repo.
51+
- SFC: Since notes are always associated with an issue, we could also copy the notes from each agenda item into a comment on that issue.
52+
- USA: DE suggested that it would be good to have permalinks.

0 commit comments

Comments
 (0)