2 ms·
All of those things I see as productivity issues, not language fundamentals. TypeScript solves types in JS for me the way Laravel solves superglobals in PHP. A
by crabmusket 3y ago
All of those things I see as productivity issues, not language fundamentals. TypeScript solves types in JS for me the way Laravel solves superglobals in PHP.
Adding properties to an object is fine IMO. Arbitrary properties and prototypes are, to me, a much cleaner system than PHP's somewhat confused mix of array, object and class. The lower you go in JS the more unity of concepts there is, whereas the lower you go in PHP the more hacks you discover.
All of the above said, I would prefer a string concatenation operator to overloading +. JS template literals mostly solve that for me in practise. And what I really actually want is an equivalent of Haskell's <> or mconcat, which concatenates anything monoidal - strings, lists, etc.