Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29934
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Wait on keyboard |
| Date | 2016-03-12 14:44 +0100 |
| Organization | PointedEars Software (PES) |
| Message-ID | <1842824.xj4pi0fp9G@PointedEars.de> (permalink) |
| References | <6ef267d6-7655-4699-9363-d6e0f613f899@googlegroups.com> <nbuq32$gg0$1@news.albasani.net> <9658502.p6PyTM0SGn@PointedEars.de> <nc0qjv$b4e$1@news.albasani.net> |
Stefan Weiss wrote: > On 03/12/2016 04:44, Thomas 'PointedEars' Lahn wrote: >> Stefan Weiss wrote: >>> With a little generator magic, you can make individual functions >>> pause-able: >>> >>> var jonas = S(function* (start, max) >> >> In which ECMAScript implementation is this not a syntax error, and if >> there is any, what does it mean there? > > That's the generator function syntax: > http://www.ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function* > > It's supported by current versions of Firefox, Chrome, Edge (with the > experimental flag), and others: > http://kangax.github.io/compat-table/es6/#test-generators_basic_functionality Fascinating. I would have thought that generator functions (which had been introduced with JavaScript 1.7, but not specified before ECMAScript 2015) would not require additional syntax except the “yield” keyword. However unfortunately, apparently Ecma-TC39 settled for specifying a backwards- incompatible approach as it works in JavaScript 38 even without the asterisk as it did since version 1.7. <http://PointedEars.de/es-matrix/?filter=generator%7Cyield> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*#Generators_and_iterators_in_Firefox_versions_before_26> pp. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 02:30 -0800
Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-11 10:37 +0000
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 02:50 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:13 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:23 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:32 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:39 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 04:41 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 05:00 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 05:43 -0800
Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-11 12:13 +0000
Re: Wait on keyboard "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-11 21:52 +0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 07:29 -0800
Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-11 17:00 +0100
Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-11 17:11 +0100
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 08:32 -0800
Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-11 20:20 +0100
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 08:55 -0800
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-11 16:30 -0300
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 11:46 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:22 -0800
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-11 17:25 -0300
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:32 -0800
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-11 17:42 -0300
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:52 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:47 -0800
Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:39 -0800
Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:37 -0800
Re: Wait on keyboard John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-12 13:16 +0000
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 05:57 -0800
Re: Wait on keyboard John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-13 10:31 +0000
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 05:55 -0700
Re: Wait on keyboard "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-13 17:19 +0100
Re: Wait on keyboard Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-13 13:01 -0700
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 15:19 -0700
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-13 20:08 -0300
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 21:45 -0700
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-14 01:50 -0300
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 22:39 -0700
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 22:46 -0700
Re: Wait on keyboard Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-14 11:54 -0700
Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-14 08:31 +0000
Re: Wait on keyboard John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-14 10:43 +0000
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 06:04 -0800
Re: Wait on keyboard "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-12 15:22 +0100
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 07:46 -0800
Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-12 15:52 +0000
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 09:25 -0800
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-12 20:16 -0300
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 15:57 -0800
Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-12 21:07 -0300
Re: Wait on keyboard Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-12 21:27 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 03:08 -0700
Re: Wait on keyboard "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-12 23:30 +0100
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 06:15 -0800
Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:33 -0800
Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 03:01 -0800
Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:30 -0800
Re: Wait on keyboard Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-12 04:44 +0100
Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-12 11:21 +0100
Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-12 11:27 +0100
Re: Wait on keyboard Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-12 14:44 +0100
Re: Wait on keyboard "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-14 18:58 +0800
csiph-web