1. 5

  2. 5

    I cringed a bit when I saw this on the project page:

    Class definitions closely resemble the familiar syntax of languages like Java and PHP

    Why do people continue to try and shoehorn ‘classical’ inheritance into javascript? The implementation is almost always ugly. Why not just embrace the prototypical inheritance the language comes with?

    1. 2

      umm, and by ‘prototypical,’ I of course mean ‘prototypal’

      1. 1

        Why not just embrace the prototypical inheritance the language comes with?

        I lean in this direction too, but I can’t lieā€¦ I am really intrigued by this project.

        Frameworks that adopt “classical” concepts have always left all the good stuff out. By that I mean abstraction, interfaces, finality, statics, constants, etc. This seems to be filling that gap better than my expectations lead me to believe. An optional new on constructors is pretty nice, too (however I believe it can enable bad habits).

      2. 2

        If a web page executes non free code, how are you able to audit it?

        By reading it?

        1. 4

          Reading obfuscated/minified JS is not the easiest thing to do.

          1. 2

            So nobody is going to minify ease.js? Of course they will, it’d be silly not to. So I’m going to go to a website, click around for the link to the unminified js, download it and minify it myself, and then compare to the minified version they’re serving? At this point it seems a little too late. My browser is already running their code; any unpleasantries in it have already done whatever they’re going to do.

        2. 1

          IMO, the best “lightweight” classical JS library was whipped together by John Resig a long time ago.


          Super simple – you use Class.extend(...) to build a class, use the init key for constructors, use YourClass.extend() with the same syntax for inheritance, and you use this._super to get a “super object” for calling superclass methods. Very little to remember, tiny to embed, and It Just Works.