!wbACpffbfxANskIFZq:matrix.org

TC39 General

255 Members
The equivalent of #tc39 on IRC | Public logs at https://matrixlogs.bakkot.com/TC39_General/12 Servers

Load older messages


SenderMessageTime
23 Feb 2024
@shuyuguo:matrix.orgshu * yeah i think it's that or "can call user code" is what the spec's u mode says01:08:03
@pchimento:igalia.comptomatoI think it's confusing who the "user" actually is01:19:34
@jackworks:matrix.orgJack Workswhen we work as a framework/spec/library/engine developer, the user actually means other developer but using this term is strange I agree03:18:06
@usharma:igalia.comryzokuken changed their display name from ryzokuken to ryzokuken (sick).11:03:05
@shuyuguo:matrix.orgshu"user code" is code not under your control, so it's relative18:28:47
@shuyuguo:matrix.orgshui don't think it's confusing in practice, since the frame of reference is usually pretty clear, whether it's a spec or a framework18:29:30
24 Feb 2024
@kriskowal:matrix.orgKris Kowal This all flows from the terms kernel mode and user mode. As Shu says, it’s relative, it’s an analogy. 04:30:12
@gibson042:matrix.orgRichard GibsonRing 2.6215:26:00
27 Feb 2024
@rkirsling:matrix.orgrkirsling...of hell?07:57:56
@usharma:igalia.comryzokuken changed their display name from ryzokuken (sick) to ryzokuken.14:54:21
29 Feb 2024
@sffc:mozilla.orgsffcIs it better to return null or undefined for a Rust API that returns Option? https://github.com/rust-diplomat/diplomat/pull/43506:37:53
@sffc:mozilla.orgsffc* In JS/TS, is it better to return null or undefined for a Rust API that returns Option? https://github.com/rust-diplomat/diplomat/pull/43506:38:18
@sffc:mozilla.orgsffc* In JS/TS, is it better to return null or undefined for a Rust API that returns Option? Trying to decide the default behavior in ICU4X. https://github.com/rust-diplomat/diplomat/pull/43506:38:56
@ljharb:matrix.orgljharbsadly we don't have an Option type (alternatively, a sync Promise), and there's no ecosystem consensus on that kind of thing. some people only use one or the other and hate the one they don't use, some people don't care. i don't have a hard rule for myself either, it's more of a "i usually know which one it should be when i see it"07:05:51
@ljharb:matrix.orgljharbif it's representing an options object, then i'd say undefined, because then that'll trigger arg defaulting if it's passed elsewhere07:06:48
@jesse:igalia.comJesse joined the room.07:22:27
@bakkot:matrix.orgbakkot sffc: personally I would use null, but the precedent here is firmly set by wasm-bindgen / wasm-pack, and it uses undefined 17:21:24
@bakkot:matrix.orgbakkot * sffc: personally I would use null if I were doing this without consideration of precedent, but the precedent here is firmly set by wasm-bindgen / wasm-pack, and it uses undefined 17:22:19
@bakkot:matrix.orgbakkothttps://github.com/rustwasm/wasm-bindgen/pull/3245 contains a recent discussion of that decision17:23:49
@bakkot:matrix.orgbakkot

relevantly to you:

But, although I agree that mapping None to null makes more sense, I think it'll break people's code that relies on the current behaviour of it getting mapped to undefined. So, I'm not going to merge this, but I'll leave it open so that it can get merged if/when wasm-bindgen makes a breaking release.

17:24:08
@tabatkins:matrix.orgTabAtkins I fairly strongly feel that using undefined works better, because it triggers argument defaulting. JS having two nulls has always been weird. 19:06:27
@littledan:matrix.orglittledanThis argument cuts both ways—you can recover the defaulting with ?? !21:52:02
@ljharb:matrix.orgljharb you'd have to do ?? undefined tho, if you wanted to then trigger the defaulting somewhere else, which is weird and unergonomic and uncommon to know you need to do it 23:30:30
@tabatkins:matrix.orgTabAtkins In general, JS's precedent is for undefined anyway - see Map.prototype.get(). (DOM goes the opposite way in precedent, due to its unfortunate early flirtation with Java, tho.) 23:53:54
1 Mar 2024
@0x3vh8vy2l75lo4v:matrix.org@0x3vh8vy2l75lo4v:matrix.org left the room.01:16:22
@usharma:igalia.comryzokuken changed their display name from ryzokuken to ryzokuken (back monday).12:28:40
@littledan:matrix.orglittledan(I don’t have a real position one way or the other on undefined/null; was not trying to make a particular argument about which should be used where)13:51:22
3 Mar 2024
@shuyuguo:matrix.orgshu changed their profile picture.02:33:30
4 Mar 2024
@usharma:igalia.comryzokuken changed their display name from ryzokuken (back monday) to ryzokuken.10:34:38
@yulia:mozilla.orgyulia | sick changed their display name from yulia to yulia | sick.11:11:42

There are no newer messages yet.


Back to Room ListRoom Version: 6