Hacker News new | past | comments | ask | show | jobs | submit login

I just checked it. RapydScript generates very logical code than CoffeeScript.

CoffeeScript:

    var ref;
    (ref = [2, 1]) === [1, 2] || ref === [2, 1] || ref === [3, 5] || ref === [3, 5];
RapydScript:

    function _$rapyd$_in(val, arr) {
        if (arr instanceof Array || typeof arr === "string") return arr.indexOf(val) != -1;
        else {
            if (arr.hasOwnProperty(val)) return true;
            return false;
        }
    }
    _$rapyd$_in([2,1], [[1,2], [2,1], [3,5], [3,5]]);
One thing I worried about RapydScript is generated variables. Pre-compiler needs to be scope aware. I am not sure how difficult or feasible it would be.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: