09:41
<Jack Works>
is there a way to get a native function in ECMAScript that do the following thing: (f) => f()? this and arguments are not important in my use case
09:43
<Jack Works>
oh I got it. Function.prototype.call.bind(Function.prototype.call)
17:47
<ljharb>
Function.call.bind(Function.call) works too :-)
18:01
<TabAtkins>
What's the reason for doing that rather than just writing f=>f()? This way is shorter, clearer, and safer since it's 100% syntax.
18:22
<littledan>
pOiNtFrEe PrOgRaMmInG iS mOrE eLeGaNt
18:31
<ptomato>
Function.call.bind(Function.call) has more . than f=>f(), so I don't get it
18:32
<littledan>
this is the academic usage where "point" means a named variable
18:32
<ptomato>
I know, just shitposting
18:36
<Jack Works>
What's the reason for doing that rather than just writing f=>f()? This way is shorter, clearer, and safer since it's 100% syntax.
To make sure the debugger won't step in anything
18:36
<Jack Works>
It will bring better debug experience
18:37
<TabAtkins>
Ah I see, ok
18:38
<Jack Works>
https://twitter.com/jackworks_asref/status/1567372760573440000
18:38
<Jack Works>
Nowadays I write proxies in this way
20:44
<shu>
should've called it pointless programming
20:56
<bakkot>
need a directive which says "debuggers should not stop in this function"
21:11
<rbuckton>
Like C#'s [DebuggerStepThrough] attribute. Maybe someday a @debugger.StepThrough meta decorator?