Working pipe operator today in pure JavaScript
11–20 of 109 posts
Re: Working pipe operator today in pure JavaScript
#12Re: Working pipe operator today in pure JavaScript
#13Re: Working pipe operator today in pure JavaScript
#14other libraries like rxjs use .pipe(f,g,h) which works just fine.
Re: Working pipe operator today in pure JavaScript
#15Re: Working pipe operator today in pure JavaScript
#16is this solving a problem people actually have? other libraries like rxjs use .pipe(f,g,h) which works just fine.
Re: Working pipe operator today in pure JavaScript
#17Overengineered in my view, what is wrong with `x | f` is `f(x)`? Then `x | f | g` can be read as `g(f(x))` and you're done. I don't see any reason to make it more complicated than that.
Re: Working pipe operator today in pure JavaScript
#18This kind of stuff is why C++ developers has an almost overly allergic reaction to operator overloading.
Re: Working pipe operator today in pure JavaScript
#19Since this library leverages Symbol.toPrimitive, you may also use operators besides bitwise-OR. Additionally, the library does not seem to dispatch on the `hint` parameter[0]. Now I want to open a JS REPL, try placing this library's pipe object into string template literals, and see what happens. Overall, cool library. [0] https://tc39.es/ecma262/multipage/abstract-operations.html#s...
Re: Working pipe operator today in pure JavaScript
#20Further proof that JavaScript accidentally became the new C++. “Aren’t you surprised that this syntax works?” is not praise for a language design.
Serious q: but how does this sentiment change with LLMs? They can pickup new syntax pretty fast, then use fewer tokens...