2 ms·
Javascript has sweetJS. It isn't lisp, but it's about as close as most infix languages can get (with the exception of Dylan). The let in ES6 cannot be expresse
by hajile 12y ago
Javascript has sweetJS. It isn't lisp, but it's about as close as most infix languages can get (with the exception of Dylan).
The let in ES6 cannot be expressed in the same terms as a let in lisp. Mozilla proposed that kind of let with the let block ('let (<assignments>) { <statements> }').
The issue is that other idiots (in some quest to turn JS into Java or C#) decided that a block scoping kluge was a better. After all, it makes interoperability harder (old code using var), makes scoping rules implicit (blocks without let are still bound to function), adds unnecessary cognitive overhead (leading to more bugs as code gets harder to reason about and visually parse) and generally adds a whole new set of ways for new and old JS programmers to screw up.