Proposition for extension of class Arguments #194

Merged
merged 2 commits into from Jun 30, 2012

Conversation

Projects
None yet
2 participants
@igochkov
Contributor

igochkov commented Jun 29, 2012

In order to generate javascript like:
this.random.apply(this, arguments);
or
$.Widget.prototype._setOptions.apply(this, arguments);

The property name "List" is questionable. Other name choices would be "Self" or "This". Do you have suggestion for better name?

Proposition for extension of class Arguments
In order to generate javascript like:
this.random.apply(this, arguments);
or
$.Widget.prototype._setOptions.apply(this, arguments);

The property name "List" is questionable. Other options would be "Self", "This", "Instance". Do you have suggestion for better name?
@nikhilk

This comment has been minimized.

Show comment
Hide comment
@nikhilk

nikhilk Jun 30, 2012

Owner

The Arguments functionality has been a bit hacky since I added it.

This is what I should have done ... added a non-static Arguments class (with length and a read-only indexer), and a Script.Arguments property. I'll need to go back and revisit this... can't remember what was the issue.

In the interim, I'd suggest naming this to "Current" as that more accurately conveys the semantics IMO, and I'll accept the pull request.

Owner

nikhilk commented Jun 30, 2012

The Arguments functionality has been a bit hacky since I added it.

This is what I should have done ... added a non-static Arguments class (with length and a read-only indexer), and a Script.Arguments property. I'll need to go back and revisit this... can't remember what was the issue.

In the interim, I'd suggest naming this to "Current" as that more accurately conveys the semantics IMO, and I'll accept the pull request.

nikhilk added a commit that referenced this pull request Jun 30, 2012

Merge pull request #194 from igochkov/patch-1
Proposition for extension of class Arguments

@nikhilk nikhilk merged commit 6528a5d into nikhilk:master Jun 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment