Complexity and JS

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Complexity and JS

Post by agibsonsw »

Hello.

Is JavaScript potentially one of the most complex languages? I was studying C# and got as far as event delegates, when I was distracted by JS.

JS has things like closures, functions as arguments, functions are also objects, currying, prototype inheritance and..

Code: Select all

function Y(le) {
    return (function (f) {
        return f(f);
    }(function (f) {
        return le(function (x) {
            return f(f)(x);
        });
    }));
}  // Wow! (an applicative order y combinator..)
I can't recall coming across such things in other languages? I would be interested to hear an opinion :smile:
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.