Re: String.prototype.[de]normalize and .isCharXxx are needed

2012-01-17 Thread Herby Vojčík
it (the character properties, however done) not be raised? [1] http://wiki.ecmascript.org/doku.php?id=proposals:extend_regexps#extending_regexps_for_unicode_ranges Norbert On Jan 3, 2012, at 4:51 , Herby Vojčík wrote: Hello, in certain application, Unicode de/normalization and possibility to query

Re: ES6 opt-in, reloaded

2012-01-17 Thread Herby Vojčík
Andreas Rossberg wrote: On 16 January 2012 23:18, David Hermandher...@mozilla.com wrote: The goal that is missing, and what I believe is the single most important part of my New Year's email, is: 9. Allow programmers to continue thinking of JS as a single cohesive language. This is a

Re: A different semantics for WeakMap#get default value

2012-01-17 Thread Herby Vojčík
Allen Wirfs-Brock wrote: On Jan 17, 2012, at 3:45 AM, Herby Vojčík wrote: Brendan Eich wrote: Clearly(!) a set-if-not-present method should not be misnamed get. I like the optional sentinel-meaning-not-found for get, and setDefault per Python as Tab pointed out. Agree they should

Re: new ES6 specification draft

2012-01-17 Thread Herby Vojčík
Allen Wirfs-Brock wrote: An updated draft is available at the usual place (http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts ) That draft incorporated decisions made at the Nov. 2011 TC39 meeting. However, note that this draft also contains a significant amount of still in

Re: Block lambda grammar: BlockArguments

2012-01-16 Thread Herby Vojčík
Brendan Eich wrote: Herby Vojčík mailto:he...@mailbox.sk January 15, 2012 1:24 AM Nothing is going to match Smalltalk on this. Keyword parameters are not even on the map because object literals suck the oxygen out of the room. And then you'll want to get rid of the || for empty block parameters

Re: Block lambda grammar: BlockArguments

2012-01-16 Thread Herby Vojčík
Lasse Reichstein wrote: On Mon, Jan 16, 2012 at 2:14 PM, Herby Vojčíkhe...@mailbox.sk wrote: Thank you, it helped. It is the fact that in ES up till now, {} block were always delimited by a {} blocks which are parts of the same control structure. I did not talk about free blocks, but

Re: Block lambda grammar: BlockArguments

2012-01-15 Thread Herby Vojčík
-Pôvodná správa- From: Brendan Eich Sent: Sunday, January 15, 2012 7:55 AM To: Axel Rauschmayer Cc: es-discuss Subject: Re: Block lambda grammar: BlockArguments Nothing is going to match Smalltalk on this. Keyword parameters are not even on the map because object literals suck the

Re: Block Lambdas: break and continue

2012-01-15 Thread Herby Vojčík
, 2012 11:05 PM To: Herby Vojčík Cc: François REMY ; es-discuss@mozilla.org Subject: Re: Block Lambdas: break and continue Herby Vojčík January 14, 2012 1:46 PM === Brendan Eich wrote === This doesn't address Herby's TCP-violating wish for a non-return that completes the block-lambda's control flow

Re: Block Lambdas: break and continue

2012-01-15 Thread Herby Vojčík
Hi, your 'for call {|| ...}' is great and simple solution for (unlabeled) break, but it is not so for continue. For either continue could have the redesigned meaning I sketched out in my last post, but then you need expression to specify; or you want the legacy meaning of go on with the next

Re: Block Lambdas: break and continue

2012-01-15 Thread Herby Vojčík
it works as continue in forEach and every, but not in some Sorry, mistake: it works as continue in forEach and some, but not in every -Pôvodná správa- From: Herby Vojčík Sent: Sunday, January 15, 2012 1:13 PM To: Grant Husbands ; Brendan Eich Cc: es-discuss@mozilla.org Subject: Re

Re: Block Lambdas: break and continue

2012-01-15 Thread Herby Vojčík
-Pôvodná správa- From: Brendan Eich Sent: Sunday, January 15, 2012 8:56 PM To: Grant Husbands Cc: es-discuss@mozilla.org Subject: Re: Block Lambdas: break and continue ... block-Other ideas? /be === I sent an expression-less continue and break elaboration today. at 11:something

Re: Block Lambdas: break and continue

2012-01-14 Thread Herby Vojčík
Hello, I think it is a concern, too, but from other point of view. By lambdaing the block, we got an added value of TCP (that is, return return from outer function) but we lost the ability of the lambda block to early local return the value itself. Take example of forEach: it has no

Re: Block Lambdas: break and continue

2012-01-14 Thread Herby Vojčík
I realized 'break' semantics is in no way enforceable in lambda-block control structure, and each early return is in fact 'continue' (which may stop the loop or whatever depending on the value). Also, since in lambda-block, | character could be used to distinguish it from keyword-loop-continue.

Re: Block Lambdas: break and continue

2012-01-14 Thread Herby Vojčík
=== David Herman wrote === This *may* not violate TCP (I'm not quite sure), but I'm not enthusiastic about the idea. The semantics is significantly more complicated, and it requires you to understand whether a higher-order function like forEach is catching these exceptions or not. So it

Re: Block Lambdas: break and continue

2012-01-14 Thread Herby Vojčík
: Saturday, January 14, 2012 10:16 PM To: François REMY Cc: Herby Vojčík ; es-discuss@mozilla.org Subject: Re: Block Lambdas: break and continue François REMY January 14, 2012 1:01 PM If we want to avoid to break TCP, we can go with “throw break;” and “throw continue;”. This doesn't address

Blocks: minimal or multiple kinds?

2012-01-12 Thread Herby Vojčík
Hello, what is the policy and projected outcome (in spec, grammer-definition-wise as well as described-abstraction-wise) of the diiferent kinds of {...} blocks? There is plain code block, an object-literal, module block, class block, lambda-block. Maybe I missed some use case. My question

Re: Octal literals have their uses (you Unix haters skip this one)

2012-01-12 Thread Herby Vojčík
Would it be hard to bring in Smalltalkish 8r377? Another (and similar to 0) special char for specific radix - well, wouldn’t it be better to include a letter for all radixes (CoffeeScript can maybe take it on, too). Herby -Pôvodná správa- From: Brendan Eich Sent: Thursday, January 12,

Re: Blocks: minimal or multiple kinds?

2012-01-12 Thread Herby Vojčík
are problematic. None of them is problematic there, but it is on the other thread, anyway. Here I only wanted to here about either code or data, nothing in between idea. -Pôvodná správa- From: Brendan Eich Sent: Thursday, January 12, 2012 7:35 PM To: Herby Vojčík Cc: es-discuss

Re: Blocks: minimal or multiple kinds?

2012-01-12 Thread Herby Vojčík
and consistent use of building elements within each group is a Good Thing (tm). (as I am writing it, it associated me loose coupling and high cohesion). -Pôvodná správa- From: Brendan Eich Sent: Thursday, January 12, 2012 8:26 PM To: Herby Vojčík Cc: es-discuss@mozilla.org Subject: Re: Blocks

How to denote generator methods?

2012-01-10 Thread Herby Vojčík
Hi, for a function, you can instead of method: function (args) { body }, use the convenient (and non-enumerating) method (args) { body } in literal / class. But for a generator gen: function* (args) { body } what can you use to create a generator method? Would *gen (args) { body }

Re: ES6 doesn't need opt-in

2012-01-10 Thread Herby Vojčík
This is interesting issue. There is a subtle difference between prototype chain is the shared part Self mindset and the prototype chain is fallback delegation mindset. Though I knew of Self and knew it had an impact on Javascript creation, I had always an impression that in Javascript (having

Re: ES6 doesn't need opt-in

2012-01-10 Thread Herby Vojčík
delegation and creation of own property by Object.defineProperty is not an error; and creation of own property by assignment should be allowed; and inability to do it is indeed an error. Herby -Pôvodná správa- From: Herby Vojčík Sent: Tuesday, January 10, 2012 12:09 PM To: Allen Wirfs

Re: Boolean shortcuts

2012-01-09 Thread Herby Vojčík
AM To: es-discuss Subject: Re: Boolean shortcuts On Jan 4, 2012, at 2:56 PM, Brendan Eich wrote: On Jan 4, 2012, at 1:57 PM, Herby Vojčík wrote: Hi, as I already posted in the parallel thread, there is that strawman called do expression by dherman that does just that. I feel like crying

Re: ES6 doesn't need opt-in

2012-01-07 Thread Herby Vojčík
Hi, I think Allen had another point. What you are counting, are semantic modes of the code, that is, runtime. What Allen counts, are specification modes of the language, that is, compilation. These are different beans, as he said earlier. Things that Allen defines (afaict) are: -

Re: ES6 doesn't need opt-in

2012-01-06 Thread Herby Vojčík
-Pôvodná správa- From: Axel Rauschmayer Sent: Friday, January 06, 2012 12:11 PM To: Allen Wirfs-Brock Cc: Mark S. Miller ; Brendan Eich ; es-discuss Steen Subject: Re: ES6 doesn't need opt-in ... As a human, I would want an ES6 trigger to appear as early as possible. I wouldn’t

RFC: Empowered data - unification of code block and object literal (and class)

2012-01-06 Thread Herby Vojčík
This proposal tries not to add new entities into the language, it only tries to take what already is there and reusing it mercilessly. Also number of abstractions is lowered, since some of them could be implemented with existing ones, with minimal changes. The result is compact, lesser, more

Re: Boolean shortcuts

2012-01-05 Thread Herby Vojčík
Yeah, it looks. And it needs no special case in used in var. -Pôvodná správa- From: Nadav Shesek Sent: Thursday, January 05, 2012 2:00 PM To: Herby Vojčík Cc: mikesam...@gmail.com ; es-discuss@mozilla.org Subject: Re: Boolean shortcuts There was a suggestion for CoffeeScript, which

Boolean shortcuts

2012-01-04 Thread Herby Vojčík
(original article in http://blog.herby.sk/blosxom/Programming/ES-next/boolean-shortcut.html) Hello, what about shorter way to express booleans? Booleans are very nice concept, but can get bulky. That is why people may avoid using it, sometimes. Moreover, booleans are often put inside nice

Re: Make method semantic identical in classes and literals

2012-01-04 Thread Herby Vojčík
without the keyword function it is a non-enumerable data property definition whose name is the function name. So it is non-enumerable, writable and configurable, as generally presumed for methods. Could it be fixed? Herby -Pôvodná správa- From: Herby Vojčík Sent: Tuesday, January 03

No code block without introductory keyword (was: Re: Boolean shortcuts)

2012-01-04 Thread Herby Vojčík
curlie that contains some form of action to perform). Herby -Pôvodná správa- From: François REMY Sent: Wednesday, January 04, 2012 2:27 PM To: Herby Vojčík ; es-discuss@mozilla.org Subject: Re: Boolean shortcuts I agree that code block is a complex feature that is (almost) never used

Re: Boolean shortcuts

2012-01-04 Thread Herby Vojčík
-Pôvodná správa- From: François REMY Sent: Wednesday, January 04, 2012 2:27 PM To: Herby Vojčík ; es-discuss@mozilla.org Subject: Re: Boolean shortcuts BTW, I think the reason of your inconsistency is a bug : eval({}) should return undefined, as in IE9. It seems that node.js has

Re: No code block without introductory keyword (was: Re: Boolean shortcuts)

2012-01-04 Thread Herby Vojčík
cannot be a keyword since it is surely used in _lots_ of places as a variable name). Herby -Pôvodná správa- From: Maël Nison Sent: Wednesday, January 04, 2012 2:56 PM To: Herby Vojčík Cc: François REMY ; es-discuss@mozilla.org Subject: Re: No code block without introductory keyword

Re: ES6 doesn't need opt-in

2012-01-04 Thread Herby Vojčík
Then, why not to put every feature on ES6 mode only and backporting them one by one, giving time for each backport to see if it really works and not putting effort to backport another one until the previous one is generally accepted as safe? Herby -Pôvodná správa- From: Allen

Re: Boolean shortcuts

2012-01-04 Thread Herby Vojčík
-Pôvodná správa- From: Mike Samuel Sent: Wednesday, January 04, 2012 6:29 PM To: Herby Vojčík Cc: François REMY ; es-discuss@mozilla.org Subject: Re: Boolean shortcuts 2012/1/4 Herby Vojčík he...@mailbox.sk: Curse that eval-uation of a code block! This prevents not only this, but a lot

Re: No code block without introductory keyword (was: Re: Booleanshortcuts)

2012-01-04 Thread Herby Vojčík
: Herby Vojčík Sent: Wednesday, January 04, 2012 2:51 PM To: François REMY ; es-discuss@mozilla.org Subject: No code block without introductory keyword (was: Re: Booleanshortcuts) Hi, what you proposed seems like a pretty good idea (at least imho). All other uses of {...} as code block have

Re: Boolean shortcuts

2012-01-04 Thread Herby Vojčík
Hi, as I already posted in the parallel thread, there is that strawman called do expression by dherman that does just that. I feel like crying when I see how powerful data constructs could be if not hampered by possible to parse as code block ambiguity. Herby -Pôvodná správa-

Re: Boolean shortcuts

2012-01-04 Thread Herby Vojčík
: Wednesday, January 04, 2012 11:56 PM To: Herby Vojčík Cc: François REMY ; mikesam...@gmail.com ; es-discuss Subject: Re: Boolean shortcuts On Jan 4, 2012, at 1:57 PM, Herby Vojčík wrote: Hi, as I already posted in the parallel thread, there is that strawman called do expression by dherman

Re: Make method semantic identical in classes and literals

2012-01-04 Thread Herby Vojčík
Ok, thanks. If my opinion counts, then I am definitely at the side of methods should be writable and configurable unless declared const. ;-) Herby -Pôvodná správa- From: Allen Wirfs-Brock Sent: Thursday, January 05, 2012 12:13 AM To: Herby Vojčík Cc: es-discuss@mozilla.org Subject

Re: Boolean shortcuts

2012-01-04 Thread Herby Vojčík
-Pôvodná správa- From: Mike Samuel Sent: Wednesday, January 04, 2012 6:29 PM To: Herby Vojčík Cc: François REMY ; es-discuss@mozilla.org Subject: Re: Boolean shortcuts 2012/1/4 Herby Vojčík he...@mailbox.sk: Curse that eval-uation of a code block! This prevents not only this, but a lot

a little `private` quirk

2012-01-04 Thread Herby Vojčík
Hi, let's assume a constructor than calls `this.reset(...)` method in the process of initialization of an instance; and that, this method sets up lot of object properties to set up initial state, including private ones using `private(this).foo = bar;` kind of statements. It seems to me

Re: Suggestion: Array.prototype.repeat

2012-01-03 Thread Herby Vojčík
Hello, binary ftw. See http://jsperf.com/array-repeat/4 Array.prototype.repeatD. And I also tried push.apply in repeatC (not to copy over the array using concat but grow it in place until possible) and it really surprised me it was that much slower. Concat is probably heavily optimized.

Is private really private?

2012-01-03 Thread Herby Vojčík
Hello, form what I understood in the class proposal, I can write a code like this: (function () { return private(this).foo; }).apply(objectWithPrivateFoo); and it will work. Is it so? Isn’t then the notion of per-object private impossible having dynamic language with first-class function and

String.prototype.[de]normalize and .isCharXxx are needed

2012-01-03 Thread Herby Vojčík
Hello, in certain application, Unicode de/normalization and possibility to query what group the character is is vital, but ECMAScript does not have these methods nor did I see them in any of the proposals? Are they planned? Or can they be added? Thanks, Herby

Re: Suggestion: Array.prototype.repeat

2012-01-03 Thread Herby Vojčík
, January 03, 2012 2:30 PM To: Herby Vojčík Cc: Rick Waldron ; Adam Shannon ; Mariusz Nowak ; es-discuss@mozilla.org Subject: Re: Suggestion: Array.prototype.repeat repeatD(10) returns 17 copies, not 10. On Tue, Jan 3, 2012 at 4:28 AM, Herby Vojčík he...@mailbox.sk wrote: Hello, binary ftw. See http

Re: Is private really private?

2012-01-03 Thread Herby Vojčík
: Mark S. Miller Sent: Tuesday, January 03, 2012 5:31 PM To: Herby Vojčík Cc: es-discuss@mozilla.org Subject: Re: Is private really private? *Only* if that code appears appears within the text of the class of which objectWithPrivateFoo is an instance. foo is what we call a class private instance

Make method semantic identical in classes and literals

2012-01-03 Thread Herby Vojčík
Hello, overall I believe in making classes and literals as close as possible. I think at least semantics of things they have in common should be identical. In http://wiki.ecmascript.org/doku.php?id=harmony:classes, this is written: By default, data properties define enumerable prototype

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-21 Thread Herby Vojčík
-Pôvodná správa- From: Andreas Rossberg Sent: Wednesday, December 21, 2011 12:06 PM To: Tom Van Cutsem Cc: Brendan Eich ; es-discuss Subject: Re: Are Private name and Weak Map the same feature? and the Assoc API The only thing I'm worried about at this point is that there has to

How is it with the private(this)?

2011-12-21 Thread Herby Vojčík
Hello, I see some discrepancies between dynamic slot-based ES versus concept of private per-object state. The main problem seems to be that I can do this: (function() { return private(this).secret; }).call(obj); In that case, I can read (and also write) object's private property at will. But

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-21 Thread Herby Vojčík
-Pôvodná správa- From: Tom Van Cutsem Sent: Wednesday, December 21, 2011 8:42 PM To: Herby Vojčík Cc: Andreas Rossberg ; Brendan Eich ; es-discuss Subject: Re: Are Private name and Weak Map the same feature? and the Assoc API 2011/12/21 Herby Vojčík he...@mailbox.sk From: Andreas

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Herby Vojčík
Hello, I see error here. Unless I misunderstood something, in present state it so that: var n = Name(); proxy[n] // triggers handler.get(target, n.public); proxy[n.public] // triggers handler.get(target, ToString(n.public)); and n.public is object, not string. So get handler can easily

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Herby Vojčík
, this is true for set handler as well (and delete, too, ..., any one that has to deal with private name). Isn’t it? Herby -Pôvodná správa- From: Tom Van Cutsem Sent: Monday, December 19, 2011 4:50 PM To: Herby Vojčík Cc: David Bruant ; Brendan Eich ; es-discuss Subject: Re: Are Private

Re: One-time .public

2011-12-18 Thread Herby Vojčík
- From: David Bruant Sent: Saturday, December 17, 2011 7:22 PM To: Herby Vojčík Cc: es-discuss@mozilla.org Subject: Re: One-time .public Le 17/12/2011 19:03, Herby Vojčík a écrit : Hello, I saw some concerns about security of name.public and possible leak of correspondence between public and its

Forward proxies with private names

2011-12-18 Thread Herby Vojčík
Hello, I've come with the idea how to let proxies forward private names without compromising the private name and the value stored under it, as well. Please, could revise it and find the flaws? Thank you, Herby The proposal: 1. for the [[Get]] handler (scenario when that is called with

Re: noSuchMethod: funargs + invoke-only-phantoms

2011-12-17 Thread Herby Vojčík
Hello, from my point the scenario that: delete lib.toRussianName; then it still: typeof lib.toRussianName; // function, Trollface ;D is much more acceptable (it happens everyday - there are non-writable properties everywhere), than the scenario where I cannot transform

On private per-object state

2011-12-17 Thread Herby Vojčík
Hello, I see some discrepancies between dynamic slot-based ES versus concept of private per-object state. The main problem seems to be that I can do this: (function() { return private(this).secret; }).call(obj); In that case, I can read (and also write) object's private property at will.

Re: noSuchMethod: funargs + invoke-only-phantoms

2011-12-17 Thread Herby Vojčík
That's why I proposed first-class phantoms in gist: beasts that typeof to phantom, ToBoolean to false, ToNumber to 0, are wrapping a function, [[Call]] calls that function, [[Get]] and [[Prototype]] delegates to that function ([[Class]] is questionable) and rest does not work ([[Set]]

One-time .public

2011-12-17 Thread Herby Vojčík
Hello, I saw some concerns about security of name.public and possible leak of correspondence between public and its name. Maybe it can be solved by simple trick (though it will have some implication of certain parts of code). That is, each time name.public is read, _new_ object will be

Re: One-time .public

2011-12-17 Thread Herby Vojčík
Errata: I meant withOUT re-generating it, so it can do the comparision. -Pôvodná správa- From: Herby Vojčík Sent: Saturday, December 17, 2011 7:03 PM To: es-discuss@mozilla.org Subject: One-time .public Hello, I saw some concerns about security of name.public and possible leak

| ambiguity

2011-12-16 Thread Herby Vojčík
Hello, I have read some articles on wiki.ecmascript.org as well as some post here. It seems | operator (which I only recently understood that it was probably meant to be the generalization arrow hollow top turned sideways :-) ) is used two ways. As I understand, it was proposed (and I am

Re: | ambiguity

2011-12-16 Thread Herby Vojčík
. :-/ -Pôvodná správa- From: Brendan Eich Sent: Friday, December 16, 2011 8:55 PM To: Herby Vojčík Subject: Re: | ambiguity Literal does matter, because otherwise (non-literal) the operator would mutate the RHS's [[Prototype]] internal property, or else do an unspecified clone of the RHS (which

Re: | ambiguity

2011-12-16 Thread Herby Vojčík
that it can do slightly different things for them. I also apologize to those authors whom I charged with incorrect use of |. It was me who was mistaken. Herby -Pôvodná správa- From: Brendan Eich Sent: Friday, December 16, 2011 9:57 PM To: Herby Vojčík Cc: es-discuss@mozilla.org Subject: Re

<    1   2   3   4   5