15:49
<Jack Works>
there is a discussion about pipeline in a group I'm in
15:51
<Jack Works>

they want the function has the ability to know how they're called, normal function? or pipeline? and they want to have different call other in those two cases:

onClick: xxx(prevent(listener)) |> stop |> yyy,

I don't know what exact he want, but someone mentioned new.target. The function can be aware of that if they're called like new f() or f()

15:55
<Jack Works>

This reminds me that we can also use Meta property (although I'm not sure if it is a good idea) to behave differently as a custom matcher. for example

function f(x) {
if (function.matches) return function.matches(x.__val__)
// { matches: true, value: x.__val__ } ?

return x.__val__
}
15:58
<ljharb>
it seems like a really bad idea to make functions have different behavior based on what syntax constructs are used to invoke them. a function call is a function call
16:19
<TabAtkins>
Yes, that is def a bad idea imo.
17:08
<Jack Works>
it seems like a really bad idea to make functions have different behavior based on what syntax constructs are used to invoke them. a function call is a function call
ok