strict mode does not work in the real world where templates are concerned. Students don't want to see your compiled function. They may be designers, not programmers. Likely are.
Showing them a JavaScript error is simply the incorrect thing to do. And it's perfectly valid to let them clobber a member variable of the object in the with statement. Means you don't have to hold their hands explaining what they did wrong as much. On Jun 12, 2013, at 9:38 AM, Andreas Rossberg <[email protected]> wrote: > On 12 June 2013 18:27, Michael Schwartz <[email protected]> wrote: >> In the real world, your solution doesn't work. > > Are you saying that strict mode does not work in the real world? Then > I beg to differ. > >> Like I said, you get a few hundred students of varying skills creating >> templates. Many will just cut&paste from existing templates, etc. >> >> "use strict" works on the compiled template. >> >> Throwing a run time error or showing the end user the compiled script with >> reference to it for line number where errors occurred is not acceptable. > > How is that any different from any other mistake you can make in template > code? > > /Andreas > > -- > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
