Re: New Promise Syntax Proposal

2017-11-06 Thread Jorge Téllez
rface.question(question, function(input) { resolve(input); }) } run(); ``` __ Jorge Téllez +52 1 81 2567 8257 @novohispano <http://twitter.com/novohispano> > On Nov 6, 2017, at 9:33 AM, Jonathan Barronville > wrote: > > From the example provided, as someone who uses promise

New Promise Syntax Proposal

2017-11-06 Thread Jorge Téllez
prototypes. __ Jorge Téllez +52 1 81 2567 8257 @novohispano <http://twitter.com/novohispano> ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: for statement with index and value

2015-07-13 Thread Jorge Bucaran
Unless you have a specific requirement I am missing, your use case is more elegantly resolved IMO using a custom generator that yields exactly the information you need per iteration. A functional approach using a function that has the information you need is also another valid solution. --

Re: How to fix the `class` keyword

2015-03-04 Thread Jorge
On 04/03/2015, at 20:17, Matthew Robb wrote: > > > ​Sorry this should have read: > ``` > var x = Object.create(X.prototype); X.call(x); > ```​ Ooops, too late, sorry... :-P -- ( Jorge )(); ___ es-discuss mailing list es-discuss

Re: How to fix the `class` keyword

2015-03-04 Thread Jorge
interchangeable. In one case the prototype is X.prototype and in the other it's Object.prototype. Have you never seen this line in constructors? if ( !( this instanceof X ) ) return new X(a.copy.of.the.arguments.goes.here); -- ( Jorge )(); _

Re: Object.assign and inherited properties

2015-02-28 Thread Jorge
On 27/02/2015, at 16:16, Andri Möll wrote: >> because every object inherits from Object.prototype [ {} instanceof Object, Object.create(null) instanceof Object ] -> [true, false] -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mo

Re: Function "name" property

2015-02-26 Thread Jorge
f }; a=f; f=null; a() -> null -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

04+05 vs 040+050

2014-10-03 Thread Jorge Chamorro
$ node 04+05 9 040+050 72 Is that right? Isn't it a bit of a mess/wtf? Is it going to stay so in the future? Thank you, -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: eval of let, etc. Was: Re: restrictions on let declarations

2014-02-17 Thread Jorge Chamorro
eclaration are never >>> dynamically added to a non-global environment. >> >> +lots, this should be front of mind. >> >> In a block, we want the bindings local to that block to be statically >> analyzable. We want no non-local mode effects.

Re: restrictions on let declarations

2014-02-14 Thread Jorge Chamorro
hould say 0 and I can't see why that is not >> obvious. > > Interesting! > > You don't want the alert to show undefined, so the extent of the inner > binding in your model is the unbraced consequent of the "if". > > That is not "block scope

Re: [Json] Response to Statement from W3C TAG

2013-12-08 Thread Jorge Chamorro
On 08/12/2013, at 16:26, Carsten Bormann wrote: > > * Way forward > > As always, only the chairs can speak for the JSON WG, and even they > need to confirm any needed consensus in the WG beforehand. But I > think I can say that we are still only guessing what TC39 is trying to > achieve with the

Re: Generic Bundling

2013-10-28 Thread Jorge Chamorro
rk > around the limit of six parallel requests. The moment you remove that > limitation, bundling is unnecessary and only hurts performance. The ability to ask for n files in a *single* request is key, yes. -- ( Jorge )(); ___ es-discuss mailing

Re: Generic Bundling

2013-10-25 Thread Jorge Chamorro
gt; ± there's a round-trip delay per request (even with http2.0), and that the > only > ± way to avoid it is to bundle things, as in .zip bundling, to minimize the > ± (number of requests and thus the) impact of latencies. > > Go find some HTTP2 presentation, yo

Re: Generic Bundling

2013-10-24 Thread Jorge Chamorro
pact of latencies. And there's something else I think .zip bundling can provide that http2.0 can't: the guarantee that a set of files are cached by the time your script runs: with such a guarantee you could do synchronous module require()s, à la node.js. Cheers, -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 22:11, David Bruant wrote: > You already can with inlining, can't you? It would also be very interesting to know if you had .zip packing, would you be inlining? -- ( Jorge )(); ___ es-discuss mailing list es-discuss@moz

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
k the browser cache? Browser caching relies on knowing > when - and when *not* to ask. If server push starts sending things without > being asked, isn't that potentially sending down a lot of unnecessary data? I think I've read somewhere that it sends the resources in separate &

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
e the connection has been established, a network packet takes almost 250 ms to go from the ethernet port of my computer the the ethernet port of a server in Brazil, and another 250 ms for the response packet to come back. The only work around for that is making as few requests as po

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
vial always: often you can't simply concatenate and expect it to work as-is (e.g. module scripts). -You might be forcing the server to build and/or gzip (á la PHP) on the fly => much more load per request. -Inlined source isn't always semantically === non-inlined sou

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 18:47, Andrea Giammarchi wrote: > IIRC roundtrip happens once per domain so your math is a bit off. Can you elaborate? I don't quite understand... Thank you, -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.o

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
st with 500 ms of latency, is 500kB on a 1 megabyte per second ADSL, or 1 megabyte in a 2 megabyte/s ADSL, etc. So for 60 requests it's 30 or 60 megabytes. Yes a server could perhaps fix that for me almost transparently, but with this I could as well fix it all by mys

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
ithub.io/zip.js/> ? -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 13/10/2013, at 21:34, Brendan Eich wrote: > Jorge Chamorro wrote: >> >> Are main.js and assets.zip two separate files, or is main.js expected to >> come from into assets.zip? > > The latter. > >> I think the latter would be best because it would guaran

Re: Generic Bundling

2013-10-11 Thread Jorge Chamorro
ervers are much more complicated than that, and no two servers are programmed nor configured equal. And http2.0 and 'speedy' and all their beauty too, in the future. Why does it have to be one or the other? -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Generic Bundling

2013-10-11 Thread Jorge Chamorro
appened? Why was it ditched? Was it, perhaps, too ahead of its time? Let's try again :-) -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Generic Bundling

2013-10-11 Thread Jorge Chamorro
On 11/10/2013, at 13:23, David Bruant wrote: > Le 11/10/2013 12:46, Jorge Chamorro a écrit : >> On 11/10/2013, at 12:02, David Bruant wrote: >> >>> Providing a zip in the manifest file could work, but I'm not sure I see the >>> benefit over individual

Re: Generic Bundling

2013-10-11 Thread Jorge Chamorro
Another is than once the .zip has been unzipped, its files can be accessed synchronously. -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Generic Bundling

2013-10-11 Thread Jorge Chamorro
time main.js runs, as if they were local files, ready to be require()d synchronously. -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Generic Bundling

2013-10-11 Thread Jorge Chamorro
nd. Because all the files in the .zip would appear to be 'local', a synchronous require() can be built on top of that, and suddenly we'd have almost 100% node-style modules compatibility in browsers. Or am I missing something? -- ( Jorge )();

Re: Are there any plans to introduce Date/Time literals?

2013-10-09 Thread Jorge Chamorro
On 09/10/2013, at 18:46, Oliver Hunt wrote: > > function f() { > var undefined = null /* fix that silly null vs. undefined shenanigans */, > NaN = Math.sqrt(2) /* make sure nan is not rational */, > Infinity = 1000 /* this should be big enough */ > } Sheesh, fix NaN, it shouldn't be

Re: FYI: Ecma-404 approved and published

2013-10-09 Thread Jorge Chamorro
On 08/10/2013, at 19:59, Allen Wirfs-Brock wrote: > The Ecma General Assembly has approved by letter ballot Ecma-404 Hmmm, ECMA-404... why 404? The "not found" web standard? Pun intended? -- ( Jorge )(); ___ es-discuss mailing li

Re: FYI: Ecma-404 approved and published

2013-10-08 Thread Jorge Chamorro
There's a typo in 9.-String: the phrase "All characters may be placed within the quotation marks except for the characters that must be escaped: quotation mark (U+0022), reverse solidus (U+005C), and the control characters U+ to U+001F. " is repeate

Re: FYI: Ecma-404 approved and published

2013-10-08 Thread Jorge Chamorro
IIUC top level values are valid JSON texts now, is that right? """ 4 JSON Text A JSON text is a sequence of tokens formed from Unicode code points that conforms to the JSON value grammar. """ The document is sublime. 14 pages of which 8 are not content. Now that&

Re: setImmediate

2013-08-09 Thread Jorge Chamorro
l() call to let the program know if there were any events pending, in a program in a busy loop this helps decide whether it's time to yield or not. -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Array.prototype.last

2013-07-28 Thread Jorge Chamorro
On 28/07/2013, at 14:13, David Bruant wrote: > Hi, > > Asked by Angus Croll [1]. Interestingly, people who answered giving code > didn't agree on a method or getter. Hence the need for a standard :-) I've seen that before, somewhere, but it was .peek() not .last: [1,2]

Re: Questions on clz and toInteger

2013-07-12 Thread Jorge Chamorro
ng(2).length 53 (Math.pow(2,52)-1).toString(2) "" (Math.pow(2,52)-1).toString(2).length 52 Math.pow(2,52)-0.5 4503599627370495.5 Math.pow(2,52)+0.5 4503599627370496 -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: more numeric constants please (especially EPSILON)

2013-07-11 Thread Jorge Chamorro
On 10/07/2013, at 03:45, Brendan Eich wrote: > Jorge Chamorro wrote: >> On 10/07/2013, at 03:23, Brendan Eich wrote: >>> Mark S. Miller wrote: >>>> FWIW, we include 2**53 as in the "contiguous range of exactly >>>> representable natural numbers&quo

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jorge Chamorro
ises proving some properties of this > code correct and laying the groundwork for proving conservation of currency. > However, none have previously spotted this hole. Right, if balance+amount ever result in 2**53+1, the code would rather "see" it (and save it!) as 2**53. Sort of a

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jorge Chamorro
ses/startSES.js#492 > > It's exactly representable, but its representation is not exact. If that > makes sense! 2**53 is exactly representable, but it gets the exact same representation as 2**53 + 1 -- ( Jorge )(); ___ es-discuss mailing l

Re: more numeric constants please (especially EPSILON)

2013-07-09 Thread Jorge Chamorro
er (2^53+1) that cannot be exactly represented. > > In other words, if you see the IEEE float 64 encoding of > 9,007,199,254,740,992 you don't know if it is an exact representation of 2^53 > or an approximate representation of 2^53+1. > > 2^53-1 is the max integer value

Re: IIAFEs?

2013-06-01 Thread Jorge
On 02/06/2013, at 01:22, Brandon Benvie wrote: > On 6/1/2013 3:44 PM, Jorge wrote: >> But they're not fully interchangeable, for example I can exit a function at >> any point with a return, but can I exit a block at any point with a break or >> something? >

Re: IIAFEs?

2013-06-01 Thread Jorge
sion” that would be able to > do so: > http://wiki.ecmascript.org/doku.php?id=strawman:do_expressions Do expressions are cool! Are they in for es6? Thanks. -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Harmony modules

2013-06-01 Thread Jorge
d from the network when is JS there's no means for IO? Thank you, -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: IIAFEs?

2013-06-01 Thread Jorge
On 01/06/2013, at 23:49, Axel Rauschmayer wrote: > > On Jun 1, 2013, at 14:38 , Jorge wrote: >> >> How would this: >> >> (Function () { >> >> // ... >> >> })(); >> >> now look like with arrow functions? >> >&g

Re: IIAFEs?

2013-06-01 Thread Jorge
s/Function/function/g ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

IIAFEs?

2013-06-01 Thread Jorge
Hi, How would this: (Function () { // ... })(); now look like with arrow functions? (()=>{ // ... })(); What can be left out, if anything? Thank you, -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org ht

Re: Future feedback

2013-05-14 Thread Jorge
mes behave as if setImmediate()d: you never know for sure. To have a new event loop model that may block is a bad thing IMO, and the "let's add a counter" solution isn't a good solution. Before the mod always knew what was going to happen, now you don't. -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Futures (was: Request for JSON-LD API review)

2013-04-18 Thread Jorge
JS infested of inconvenient APIs w3c-style? -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: More flexibility in the ECMAScript part?

2013-04-18 Thread Jorge
t; 3) remove a message (clearTimeout which cancels a message added via a > setTimeout message). and this has nothing to do with the events queue. -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Upcoming talk on ES6 in Russia

2013-03-23 Thread Jorge Chamorro
x;, and would allow the new forms, e.g. .map(ƒ(n) ...). It's ~ the same case as `with` and if they really wanted it could be done, I don't buy the "it wasn't possible", no. But as bluntly as @rwaldron put it the other day: "arrows are here to stay"

Re: Self-recursion and arrow functions

2013-03-17 Thread Jorge Chamorro
than const fib = (n) => { ... }; ? -- (Jorge)(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Self-recursion and arrow functions

2013-03-17 Thread Jorge Chamorro
free var to function properly which is a hazard. It never ocurred to me that using const instead of var/let as you've done above fixes that, thank you! Still, ƒ named lambdas have the advantage that can be used directly as expressions, without going through any const roundabouts. > Ok, and

Re: Self-recursion and arrow functions

2013-03-17 Thread Jorge Chamorro
x => f(v => x(x)(v))) > > which can be conveniently inlined into any expression where it's used: > > js> [1,2,3,4,5,6].map((n)=>(f => (x => f(v => x(x)(v)))(x => f(v => > x(x)(v(self => n => n>1 ? n*self(n-1) : n)(n)); > [1

Re: Self-recursion and arrow functions

2013-03-17 Thread Jorge Chamorro
e > > var rec = (f) => f((...args)=>rec(f)(...args)); > > var f = (self)=>(n)=> n>1 ? n*self(n-1) : n; > > [1,2,3,4,5,6].map((n)=>rec(f)(n)); God, my eyes, they're bleeding! Sorry arrow functions but this isn't a better JS. -- (Jorge)();

Re: a future caller alternative ?

2013-03-09 Thread Jorge Chamorro
JavaScript: <http://www.youtube.com/watch?v=T6TTQoqln7c> We'd much rather play with unloaded guns than in hopes that nobody else pulls the trigger? -- (Jorge)(); ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: 10 biggest JS pitfalls

2012-12-31 Thread Jorge Chamorro
(even silent failures which is worse), it should better halt and complain loudly about syntax errors. IOW, Javascrhipster's style code is nothing but a big multi line syntax error, fixed by ASI. Happy new year! -- Jorge. ___ es-discuss mailing

Re: A new function name property proposal

2012-11-26 Thread Jorge Chamorro
es yes sometimes no, functions' names are free vars. Cheers, -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: A new function name property proposal

2012-11-24 Thread Jorge Chamorro
On 24/11/2012, at 07:14, Brendan Eich wrote: > Jorge Chamorro wrote: >> >> >> Bind the name inside the function *too*. > > That's not a compatible change, and unmotivated by any actual foot damage. > >> The footgun (1) is to have the name bound *only*

Re: A new function name property proposal

2012-11-23 Thread Jorge Chamorro
On 23/11/2012, at 18:47, Brendan Eich wrote: > Jorge Chamorro wrote: >> On 22/11/2012, at 09:38, Brendan Eich wrote: >>> Right. I think Jorge may be concerned that naming a function does not >>> always relieve the "need" for arguments.callee. But that'

Re: A new function name property proposal

2012-11-23 Thread Jorge Chamorro
expression it's a static scope that sits >> between the outer scope and the (during execution of the function) inner >> scope. >> >> Also just to clarify, the above isn't something I'm proposing. It's how >> things currently work. > > Righ

Re: A new function name property proposal

2012-11-21 Thread Jorge Chamorro
On 19/11/2012, at 20:34, Brandon Benvie wrote: > > On Mon, Nov 19, 2012 at 2:29 PM, Jorge Chamorro Bieling > wrote: >> On 17/11/2012, at 18:45, Brandon Benvie wrote: >> >>> The name property doesn't currently (and the I don't propose it should) >>

Re: A new function name property proposal

2012-11-19 Thread Jorge Chamorro Bieling
e might end with function whose name (the value returned by function.name) might be !== than its name as "seen" from inside the function itself: function ƒ () { return (ƒ.name !== 'ƒ') } ? -- Jorge. ___ es-discuss mailing list es-

Re: A new function name property proposal

2012-11-17 Thread Jorge Chamorro Bieling
o you mean both the string in function.name *and* that var's name? Cheers, -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: `free` operator

2012-10-27 Thread Jorge
ect); } On the other hand, I have to say that I sympathize very much with the idea of being able to say "destroy and garbage collect this object right now, no matter what, no matter who else might hold a reference to it". But that's because I don't buy so much the argument &q

Re: typeof null

2012-05-09 Thread Jorge
if (Array.isArray(x)) ... else if (RegExp.isRegExp(x)) ... else if ( etc ) When you just want to assert that x is of type Type, then an if (Type.isType(x)) would be ok, but a proper typeof would do just as well: if (typeof x === "Type") So it seems that a new, fixed typeof would be b

Re: typeof null

2012-05-09 Thread Jorge
ways been talking about primitive values and objects, isn't it? Are we going to have RegExp.isRegExp() and Date.isDate() and Number.isNumber() etc. too ? -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Should ... be suffix rather than prefix?

2012-04-03 Thread Jorge
ys ends the parameters list. -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: arrow function syntax simplified

2012-04-02 Thread Jorge
a constructor function called with `new`, yes, `this` is most likely going to be the right `this` always, but when you are building objects with a factory (e.g. with a .create() method), the enclosing `this` usually isn't going to be the right one. -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: arrow function syntax simplified

2012-04-02 Thread Jorge
On Apr 2, 2012, at 2:12 PM, Brendan Eich wrote: > Jorge wrote: >> >> No [[Scope]]? I must be missing something! Given this code: >> >> bound= (function a(i) { return function b () { return i }.bind(null) })(27); >> bound() >> --> 27 >>

Re: arrow function syntax simplified

2012-04-02 Thread Jorge
row functions (AF). Features: captured `this', captured `this' even in > case of `new'. And [[Extensible]] === false... I wonder why, why non-extensible ? -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: optional "function" keyword

2012-03-10 Thread Jorge
onsidered as an alternative for short function syntax, that is, {| params | /* body */ } is a perfectly valid candidate for short functions, without TCP. And given that `this` is an invalid name for a parameter, to indicate a bound this we could simply include it in the parameters list: {

Re: Consider extending JSON grammar to support objects with circular reference

2012-03-06 Thread Jorge
> there would be a major security benefit from safely parsing it at the ES > engine level. Yes, please, that would be awesome. IIRC Crockford proposed ~ that about a century ago (JsonRequest() or something, ISTR) +1k -- Jorge. ___ es-discuss mai

Re: Consider extending JSON grammar to support objects with circular reference

2012-03-06 Thread Jorge
, and restore them with .parse() with their proper types/classes. • understand and serialize all the JS primitives, including undefined • properly recreate the holes in Arrays -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org ht

Re: Shouldn't timers be specified?

2012-01-22 Thread Jorge
On 23/01/2012, at 04:57, Mikeal Rogers wrote: > On Jan 22, 2012, at January 22, 20121:35 PM, Jorge wrote: >> . Not at all. Not only it doesn't clamp to 4ms (which happens to be a good >> thing, IMO), but its timers often fire out of order ! > > node.js does not confor

Re: Shouldn't timers be specified?

2012-01-22 Thread Jorge
asing success in non-browser, no-DOM host environments *that want setTimeout*. I'm open to Ecma TC39 absorbing setTimeout and the minimum machinery it entrains. We should ping Hixie. Why ? What has changed ? P.S. Node.js does *not* conform. Not at all. Not only it doesn't clamp to 4ms (wh

Re: Block lambda is cool, its syntax isn't

2012-01-21 Thread Jorge
On 21/01/2012, at 05:31, Brendan Eich wrote: >> Jorge <mailto:jo...@jorgechamorro.com> >> January 20, 2012 7:15 PM >> >> Sorry, I don't follow, with "that" you mean "something else" or "the acute >> accent" ? > > Oh,

Re: Block lambda is cool, its syntax isn't

2012-01-20 Thread Jorge
e" or "the acute accent" ? str = ´agudo´ Error • message: "Invalid character '\u0180'" -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Block lambda is cool, its syntax isn't

2012-01-20 Thread Jorge
imeout( ƒ name () { ... }, 1e3) setTimeout( `name () { ... }, 1e3) ƒ name () { ... } `name () { ... } -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Block lambda is cool, its syntax isn't

2012-01-20 Thread Jorge
On 20/01/2012, at 19:17, Brendan Eich wrote: >> Jorge <mailto:jo...@jorgechamorro.com> January 20, 2012 1:22 AM >> >> Has a backtick/accent grave ever been considered and/or rejected ? >> >> Anonymous function expression: >> >> setTimeout( `(

Re: Block lambda is cool, its syntax isn't

2012-01-20 Thread Jorge
nsidered and/or rejected ? Anonymous function expression: setTimeout( '(){ ... }, 1e3); Named function expression: setTimeout( 'name(){ ... }, 1e3); Declarations: `(){ ... } // error: can't declare anonymous functions `name(){ ... } -- Jorge.

Re: "Approx-equal" operator

2011-12-19 Thread Jorge
for control abstractions that look like built-in control-flow statements." The thread was "block lambda revival": <https://mail.mozilla.org/pipermail/es-discuss/2011-May/thread.html#14563> Cheers, -- Jorge. ___ es-discuss maili

A (perhaps) useful thing to keep in mind.

2011-11-23 Thread Jorge
ht require two braces. Or whatever. Just saying. My 0.02 -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: for own(...) loop (spin-off from Re: for..in, hasOwnProperty(), and inheritance)

2011-11-09 Thread Jorge
On 09/11/2011, at 22:05, Brendan Eich wrote: > On Nov 9, 2011, at 12:40 PM, Jorge wrote: >> On 08/11/2011, at 22:17, John J Barton wrote: >>> Just as a point of comparison, I use this form: >>> Object.keys(o).forEach( function(key) { >>>body >>> });

Re: for own(...) loop (spin-off from Re: for..in, hasOwnProperty(), and inheritance)

2011-11-09 Thread Jorge
out of a forEach 'loop' ? -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Lecture series on SES and capability-based security by Mark Miller

2011-11-04 Thread Jorge
On 04/11/2011, at 18:51, Jorge wrote: > On 03/11/2011, at 23:55, Mark S. Miller wrote: >> 3) Although SES is *formally* an object-capability language, i.e., it has >> all the formal properties required by the object-capability model, it has >> bad usability properties

Re: Lecture series on SES and capability-based security by Mark Miller

2011-11-04 Thread Jorge
get: function(i) { return array[i]; } }); } o= makeTable(); o.add(1); o.add(2); o.add(3); o.add('Yay!'); o.store('__proto__', {push:function () { console.log(this) }}); o.add(); Gives: [ 1, 2, 3, 'Yay!' ] -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: More thoughts on Allen’s class definition pattern

2011-10-31 Thread Jorge
On 31/10/2011, at 18:07, Brendan Eich wrote: > On Oct 31, 2011, at 10:04 AM, Jorge wrote: >> >> Hmm, it's grawlix-y too but... how about >> >> let object= base :: {a: 1, b: 2}; >> >> ? > > No, that's wanted for wiki.ecmascript.org/doku.

Re: More thoughts on Allen’s class definition pattern

2011-10-31 Thread Jorge
On 31/10/2011, at 08:57, Brendan Eich wrote: > On Oct 31, 2011, at 12:20 AM, Jorge wrote: >> >> >> Perhaps a long arrow may work ? >> >> let object= base <== {a: 1, b: 2}; > > Does not overcome the grawlix objection. Hmm, it's grawlix-y too but

Re: More thoughts on Allen’s class definition pattern

2011-10-31 Thread Jorge
)\s+(\w)+/g > > It's still idiomatic as a name for differential inheritance, but it is more > pithy than 'make' or 'create' (and one character shorter than 'create' -- no > Unix 'creat' reruns! ;-). Comments? > >

Re: yield and Promises

2011-10-21 Thread Jorge
On 21/10/2011, at 21:23, Dean Landolt wrote: > On Fri, Oct 21, 2011 at 3:20 PM, Jorge > On 21/10/2011, at 17:40, Eric Jacobs wrote: >>> >>> Jorge, >>> >>> Would it still be satisfying to you if instead of writing the call >>> expression li

Re: yield and Promises

2011-10-21 Thread Jorge
On 21/10/2011, at 17:40, Eric Jacobs wrote: > Jorge, > > Would it still be satisfying to you if instead of writing the call expression > like this: >> try { >> response = asyncFunction(request); //might suspend execution >> } >> catch (e) { >> //

Re: yield and Promises

2011-10-21 Thread Jorge
On 21/10/2011, at 11:07, Jorge wrote: > > And this has several (valuable, imo) advantages: > > - We aren't trashing the call stack on every async call: we can finally debug > properly! > - We can (finally!) catch the exceptions where and when it matters. > - We can lo

Re: yield and Promises

2011-10-21 Thread Jorge
On 20/10/2011, at 23:37, Brendan Eich wrote: > On Oct 20, 2011, at 12:59 PM, Jorge wrote: > >> the assert_invariants() at the next line might run in another turn of the >> event loop (when f() resumes), just as the callback does. > > No. Nothing in JS today, since it lac

Re: yield and Promises

2011-10-20 Thread Jorge
On 20/10/2011, at 18:38, Brendan Eich wrote: > On Oct 20, 2011, at 6:44 AM, Jorge wrote: >> On 19/10/2011, at 23:34, Brendan Eich wrote: >>> >>> The other objection is that (ignoring some evil native APIs such as sync >>> XHR) JS has run-to-completio

Re: yield and Promises

2011-10-20 Thread Jorge
But, in the first case you can't try/catch where it matters (which is annoying), and you can't write your code linearly as if it were synchronous, which is a (bit of a) pain. So I must be missing something. What's it ? -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Grawlix

2011-10-18 Thread Jorge
JS's C-like syntax should be left as is. C remains the second most popular programming language in the world: http://tcrn.ch/prmhOf JavaScript's C-like syntax is a Good Thing™ -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Grawlix

2011-10-14 Thread Jorge
for some people it is, I would say for most people it isn't. (I see the glass almost empty). -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Subject: Re: Harmony - proxies | asynchronous

2011-09-03 Thread Jorge
t objects be passed to library code that cannot assume > plain-old-native-object non-magical semantics? Yes, buffers are live too. buffer[i] === buffer[i] may be false sometimes. -- Jorge. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Harmony - proxies | asynchronous

2011-09-03 Thread Jorge
nything but a callback and that breaking that means you're > basically breaking node. But fibers don't break that guarantee (if it exists at all: contexts are *not* immutable, even without fibers). -- Jorge. ___ es-discuss mailing list es-dis

Re: block-lambda revival

2011-06-24 Thread Jorge
On 24/06/2011, at 01:31, Mike Shaver wrote: > On Jun 23, 2011 6:14 PM, "Jorge" wrote: > >> JS -unlike other languages- is important enough that it does not need to >> follow these (dubious) trendy fashions to become popular. Nor to survive. > > Do you reall

Re: block-lambda revival

2011-06-23 Thread Jorge
plus: less to learn: an old, popular, widely used, well-known, and familiar syntax. JS -unlike other languages- is important enough that it does not need to follow these (dubious) trendy fashions to become popular. Nor to survive. Proper punctuation aids comprehension and we're programm

  1   2   >