04:44
<bakkot>
am I missing something or does parseInt not say that it should handle lowercase hex digits in base 16? https://tc39.es/ecma262/multipage/global-object.html#sec-parseint-string-radix
04:48
<bakkot>
oh, wait, I just can't read, never mind
04:48
<bakkot>
it's just a little unclear
07:24
<Ashley Claymore>
Could the function be passed as an argument to the decorator itself? Would need to be a function style one so the decorator can call it with the instance as this
13:14
<littledan>
An earlier version of the decorators proposal had this auto thunking behavior. It was removed for regularity with normal fields and especially static “shape” goals
14:24
<Mathieu Hofman>
The type problem is probably something TS will need to figure out. It should chain the transforms produced by decorators to infer the resulting type.
15:23
<Ashley Claymore>
I meant in user land @lazy(function() { return this.x * 10 })
15:25
<Ashley Claymore>
As a workaround for the TS types (personally right now I kinda like that decorators can't change the type of something, seems like a simpler starting point while we see what patterns emerge)
16:51
<littledan>
I think what Jack is asking for makes sense: a nicer way to write that without functions. Some other languages have this in their notion of field decorators
16:53
<littledan>
The goal of a static shape (the reason the original stage 2 decorators didn’t make the cut) means that we should always or never “thunkify” the rhs
16:53
<littledan>
Because a lot of use cases don’t require this, it seems to be unfortunately punishing their performance if the answer is “always”
16:54
<littledan>
Yehuda originally did include thunkifying, very much on purpose, both for this laziness feature and (more importantly) for computed reactive stuff
16:54
<littledan>
In the static shape model, we would have an additional keyword to trigger thunkifying, analogous to accessor
16:54
<littledan>
But at that point, you might as well write ()=>
23:26
<bakkot>
we gotta get https://github.com/tc39/ecma262/pull/2600 merged
23:26
<bakkot>
it's waiting on tests, is all
23:26
<bakkot>
if anyone is excited to write some tests that's a good option