News for hackers. Stuff that matters.
Re:Show HN: A JavaScript function that looks and behaves lik... by notpushkin on Thursday September 28, 2023 @04:41AM (#37686969)

    b ~> c ~> d,4 ~> e
This reads as

    b ~> c ~> (d, 4) ~> e
to me. Sure, you can get used to it, but it’s pretty unnatural. Is this syntax used in any other languages?
Re:Show HN: A JavaScript function that looks and behaves lik... by mg on Saturday September 30, 2023 @03:55AM (#37713492)
The nice aspect of "this ~> that" is that the meaning is simply "put this into that". And that it results in the shortest code.

An alternative would be:

    b ~> c ~> d ~> e(%,4)
Slightly longer, but maybe easier to read. Also easier to handle, as you can remove the fourth part " ~> e(%,4)" without having to change the third part.