Translate hook

Sam Tobin-Hochstadt samth at ccs.neu.edu
Tue Jun 18 09:13:43 PDT 2013


This is a misunderstanding of the `translate` hook in particular, and
the concept of hooks in the loader in general.  The loader hooks are
there for programmers to configure and change the default behavior of
the browser.  For example, you could modify the standard loader, or
create a new loader, so that it understood CoffeeScript.  However,
this doesn't mean that browsers will ship loaders that do this
(although of course they could). The default behavior of the
`translate` hook for the System loader is to return its input
unchanged.

Sam



On Tue, Jun 18, 2013 at 12:02 PM, jbondc at openmv.com <jbondc at openmv.com> wrote:
> I’ve been reading recently the module discussions and one particular concept
> troubled me.
>
>
>
> I don’t understand the motivation behind an on-the-fly ‘translate’ loader
> hook that would compile CoffeeScript into JavaScript.
>
> Would every browser have to include a CoffeeScript compiler? Which version?
>
>
>
> If just seems like the only result would be more ‘web fragmentation’ by
> having browsers with different EcmaScript implementations and different
> compilers/translators of many different  languages? How is that going to
> work out?
>
>
>
> While I understand the benefits in theory, in practice I get the
> overwhelming impression that an on-the-fly 'translate' concept is a great
> way to break the web, not make it any better.
>
>
>
> Am I missing something, what problem does it solve?
>
>
>
> Jon
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list