Hi,
Has JavaScript support for function currying been proposed? Maybe
there is already something like this planned?
Function.prototype.curryCall = function(scope) {
var args = [];
for (var i=1; ihttps://mail.mozilla.org/listinfo/es4-discuss
Hi,
Is there a plan for a "clone" function in ES4?
Object.prototype.clone = function() {
function F() {}
F.prototype = o;
return new F();
};
The earliest reference I have found to this function is a post by
Lasse Reichstein Nielsen in 2003 on comp.lang.java
On 10/21/07, Kris Zyp <[EMAIL PROTECTED]> wrote:
> >> http://javascript.crockford.com/prototypal.html
> It is the act of creating a object that inherits from/delegates to the
> provided object. Peter is suggesting sugar for one of the important
> mechanisms in a prototypal language. I believe the "
I've been reading the blogs and fuss over the the ES4 proposal. It
seems to me that if ES3 was so horribly inadequate then big changes to
the language would be welcomed unanimously. It must be that ES3 is
sufficient to get by well enough that we have the luxury to argue
about the worth of the propo
ECMA-262 3rd
== section 15.3.4.2 ==
Function.prototype.toString returns a representation with syntax of
FunctionDeclaration
== section13 ==
FunctionDeclaration:
function Identifier ( FormalParameterList_opt ) { FunctionBody }
FunctionExpression:
function Identifier_opt ( FormalParameterL
On Usenet's comp.lang.javascript there has been a discussion about the
internal methods like [[Get]] in the ES3 spec.
I think the ES3 spec is contradictory. Section 8.6.2 starts by
stressing the internal methods are "purely for expository purposes"
and that an "implementation of ECMAScript must be
With so many ECMAScript engines rushing ahead to implement the ES4
proposal, it seems as though the proposal is as good as approved.
Perhaps there will be minor tweaks but if so many implementations
contain classes, for example, such a feature will almost certainly be
in ES4 final.
Has the voting
On Dec 19, 2007 9:38 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
>
>
> On Dec 19, 2007, at 9:16 PM, Peter Michaux wrote:
>
> With so many ECMAScript engines rushing ahead to implement the ES4
> proposal, it seems as though the proposal is as good as approved.
>
> No,
Will proper tail calls be implicit in ES4 or will there be a need for
special syntax? I hope it is just a required optimization but then I
read this ticket
http://bugs.ecmascript.org/ticket/323
and it seems there is a suggestion that the spec will only require
proper tail calls with a "goto" stat
On Jan 18, 2008 10:49 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
>
> On Jan 18, 2008, at 9:36 PM, Peter Michaux wrote:
[snip]
Some of the shorthand terminology that has developed in the
conversations is a bit unfamiliar to me. Hopefully my questions below
are not ridiculous.
On Jan 21, 2008 5:34 AM, Igor Bukanov <[EMAIL PROTECTED]> wrote:
> On 21/01/2008, Igor Bukanov <[EMAIL PROTECTED]> wrote:
> > then I would prefer to make the tail calls an optional optimization in
> > the same way as the type checker is optional.
>
> And if Haskell language specs can leave the issu
On Jan 20, 2008 8:01 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
>
> On Jan 20, 2008, at 5:22 PM, Erik Arvidsson wrote:
>
> > My concern with E (or A for that matter) is that it requires
> > additional syntax. I'd prefer if we could keep the syntax small. I
> > don't think implicit PTC is an issu
On Jan 21, 2008 9:59 AM, Erik Arvidsson <[EMAIL PROTECTED]> wrote:
> On Mon, Jan 21, 2008 at 8:57 AM, Peter Michaux <[EMAIL PROTECTED]> wrote:
> > I think Haskell and ES are in different situations as a developer
> > chooses a Haskel implementation for executi
On Jan 21, 2008 10:50 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> On Jan 21, 2008, at 8:12 PM, Maciej Stachowiak wrote:
> > How about something like "tailcall" or "tailreturn".
>
> Or just "tail f(x, y)", Dave Herman's suggestion.
"tail" looks great and any of these three suggestions seem far b
On Jan 22, 2008 12:44 PM, Steven Johnson <[EMAIL PROTECTED]> wrote:
>
> On 1/22/08 12:14 PM, "Lars T Hansen" <[EMAIL PROTECTED]> wrote:
> Question: should an implementation be *required* to execute a tail call as a
> Proper Tail Call when possible, even if said syntax is not present? (or
> merely
2008/1/24 Nathan de Vries <[EMAIL PROTECTED]>:
> On Thu, 2008-01-24 at 20:04 +0100, Chris Pine wrote:
>
> > It was agreed that implementations would always be free to implement
> > PTC...
>
> Really? That wasn't the impression I got. My understanding is that if
> PTC isn't a requirement, it should
What it the reason for ES4 having both packages and namespaces? It
seems like both can be used to protect the global namespace from
clutter and otherwise avoid identifier clashes. When to use one and
when to use the other?
Thank you,
Peter
___
Es4-discus
Thanks for reposting Brendan's explaination. I did look around but
didn't find it.
On Jan 27, 2008 11:45 PM, liorean <[EMAIL PROTECTED]> wrote:
> I think Brendan had a nice explanation of that some time back:
>
> On 10/08/2007, Brendan Eich <[EMAIL PROTECTED]> wrote:
> > There's more work to do, i
On Jan 28, 2008 12:04 AM, Peter Michaux <[EMAIL PROTECTED]> wrote:
> Here is a concrete problem. I tried this in the reference implementation...
>
> package org {
> public var ecmascript = {a: 1};
> }
>
> package org.ecmascript {
> public var a = 2;
> }
>
Hi,
It has been over a year since the following wiki page has been updated.
http://wiki.ecmascript.org/doku.php?id=es3.1:relationship_with_the_es4_specification
Has there been any resolution about how the es3.1 specification will
be officially named?
Given that
1) es4 intends to be capable of
Hi,
I'm just curious if there has been any discussion about adding proper
tail calls back into es4 or if it is definitely out for good.
Thanks,
Peter
___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss
On Sun, Jul 6, 2008 at 3:35 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> On Jul 6, 2008, at 3:06 PM, Peter Michaux wrote:
>
>> Has there been any resolution about how the es3.1 specification will
>> be officially named?
>
> Yes, Ecma TC39 talked about this and the i
Hi Brendan,
Thanks for the reply...
On Sun, Jul 6, 2008 at 3:52 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> My belief is that if proper tail calls are to make a come-back, it will be
> through implementors leading the way. As discussed in the linked documents
> cited above, support by popular
On Wed, Aug 13, 2008 at 2:26 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
[snip]
> We talked about desugaring classes in some detail in Oslo. During
> these exchanges, we discussed several separable issues, including
> classes, inheritance, like patterns, and type annotations. I'll avoid
> writing
Reading the recent news about ES4 removing more of its old features
and morphing into Harmony, it seems that the related ideas of classes,
types and type checking are the surviving major new features.
Personally I've never quite understood why classes, types and
type-checking have been such a funda
On Wed, Aug 13, 2008 at 8:26 PM, Kris Zyp <[EMAIL PROTECTED]> wrote:
>>> We talked about desugaring classes in some detail in Oslo. During
>>> these exchanges, we discussed several separable issues, including
>>> classes, inheritance, like patterns, and type annotations. I'll avoid
>>> writing more
On Wed, Aug 13, 2008 at 10:48 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> On Aug 13, 2008, at 8:02 PM, Peter Michaux wrote:
>
>> Reading the recent news about ES4 removing more of its old features
>> and morphing into Harmony, it seems that the related ideas of cl
On Wed, Aug 13, 2008 at 11:24 PM, Neil Mix <[EMAIL PROTECTED]> wrote:
[snip]
>>> Your statement above implies that types and functional programming are
>>> mutually exclusive. Are they? I don't see it that way.
>>
>> No they aren't and I didn't mean to imply that. I intending to compare
>> the
On Thu, Aug 14, 2008 at 12:33 AM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> On Aug 13, 2008, at 11:37 PM, Peter Michaux wrote:
[snip]
>> Your points 1-4 above and the differences of opinion and preferences
>> seem to be a big obstacle to overcome in a committee by consen
On Thu, Aug 14, 2008 at 12:49 AM, Brendan Eich <[EMAIL PROTECTED]> wrote:
> On Aug 13, 2008, at 11:52 PM, Peter Michaux wrote:
[snip]
>> I use OOP frequently in JavaScript but it isn't usually the style in
>> ES3 or class-based like proposed ES4. It's the style I
On Thu, Aug 14, 2008 at 12:58 PM, Neil Mix <[EMAIL PROTECTED]> wrote:
>
> On Aug 14, 2008, at 12:30 PM, Brendan Eich wrote:
>
>> I took Neil's point to favor not only a separate lint-like tool
>> (which some find painful to procure and remember to run), but
>> possibly something like Cormac's idea
On Fri, Aug 15, 2008 at 1:40 PM, Garrett Smith <[EMAIL PROTECTED]> wrote:
[snip]
>> There remain challenges, in particular getting off of the untestable
>> and increasingly unwieldy ES1-3.x spec formalism.
>
> Unit tests:
> * help developer understanding
> * provide examples for discussion
> *
32 matches
Mail list logo