Re: Multiline Strings

2014-03-08 Thread Allen Wirfs-Brock
On Mar 8, 2014, at 11:05 AM, Mark S. Miller wrote: > > > [1] A more correct expansion is: > > var whatsThis = func( > Object.freeze({ > raw:Object.freeze(['', ' + ', '\\n = ', '']), > cooked: Object.freeze(['', ' + ', '\n = ', '']) > }), > x, > y, > x + y

Re: Multiline Strings

2014-03-08 Thread Mark Miller
On Sat, Mar 8, 2014 at 11:14 AM, Mark Miller wrote: > [...] > To see these for yourself in your own browsers, visit < > http://google-caja.googlecode.com/svn/trunk/src/com/google/caja/ses/explicit.html > >. > and click of the last two "[+]"s to expand these. -- Cheers, --MarkM ___

Re: Multiline Strings

2014-03-08 Thread Mark Miller
On Sat, Mar 8, 2014 at 11:05 AM, Mark S. Miller wrote: > On Sat, Mar 8, 2014 at 9:30 AM, Florian Bösch wrote: > >> On Sat, Mar 8, 2014 at 6:10 PM, John Barton wrote: >> >>> You may like to take a look at how the traceur compiler ( >>> https://github.com/google/traceur-compiler) works. It allows

Re: Multiline Strings

2014-03-08 Thread Mark S. Miller
On Sat, Mar 8, 2014 at 9:30 AM, Florian Bösch wrote: > On Sat, Mar 8, 2014 at 6:10 PM, John Barton wrote: > >> You may like to take a look at how the traceur compiler ( >> https://github.com/google/traceur-compiler) works. It allows one to >> write code like >> var statement = parseStatement

Enriched Descriptors, maybe ES7 ?

2014-03-08 Thread Andrea Giammarchi
Yesterday, after my DHTMLConf talk, some developer asked me to present/propose my idea about introducing **optional** types in an ES5 compatible way. Here a quick overview of properties which aim is to guard types or methods signatures, compatible with overloads for both number of arguments, and a

Re: Multiline Strings

2014-03-08 Thread Florian Bösch
On Sat, Mar 8, 2014 at 6:10 PM, John Barton wrote: > You may like to take a look at how the traceur compiler ( > https://github.com/google/traceur-compiler) works. It allows one to write > code like > var statement = parseStatement `${result}[${index}++] = > ${expression};`; > where the ${} s

Re: Multiline Strings

2014-03-08 Thread John Barton
You may like to take a look at how the traceur compiler ( https://github.com/google/traceur-compiler) works. It allows one to write code like var statement = parseStatement `${result}[${index}++] = ${expression};`; where the ${} syntax surrounds variables from the caller that are substituted in

Re: Multiline Strings

2014-03-08 Thread Florian Bösch
On Fri, Mar 7, 2014 at 8:52 PM, Peter van der Zee wrote: > I think you want to take a look at "source maps". They're specifically > designed to deal with this problem. > The problem is that a function like compileShader would look like this: var compileShader(source){ var shader = gl.createS