News for hackers. Stuff that matters.
Re:Some features that every JavaScript developer should know... by gnabgib on Monday April 14, 2025 @11:25PM (#43688722)
Neither of these cases are more readable, if you want a readable swap can you get better than:

  const [newA,newB]=swap(b,a);
It does look a lot like linq, and has the same hidden complexity problem of linq.. while C# went through extreme lengths to optimise the performance penalties down to almost negligible - JS isn't there yet (and may never be after requiring multiple engines to catch up). An individual function in a chain of drop/jump/take/filter/change(map)/cast steps cannot look ahead to future needs, nor re-order for better efficiency... a (good) software engineer can. In the same way there's good ways to write SQL (benefit from indexes and reduce the set quickly) and bad (cause full table scans).

There are no comments on this comment yet.