Skip to content

argument Object Optimizations - #2150

Merged
hueniverse merged 1 commit into
hapijs:masterfrom
arb:argument-optimization
Nov 14, 2014
Merged

hueniverse merged 1 commit into
hapijs:masterfrom
arb:argument-optimization

Conversation

@arb

@arb arb commented Nov 14, 2014

Copy link
Copy Markdown
Contributor

Related to #2148

Attempt to shore-up use of arguments object. Only need changes in a few places. Source of truth was this document.

No changes to "methods.js" per discussion.

Comment thread lib/plugin.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these changes per this

@hueniverse hueniverse added the feature New functionality or improvement label Nov 14, 2014
@hueniverse hueniverse added this to the 8.0.0 milestone Nov 14, 2014
hueniverse pushed a commit that referenced this pull request Nov 14, 2014
@hueniverse
hueniverse merged commit 2decf39 into hapijs:master Nov 14, 2014
Comment thread lib/plugin.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i, il

hueniverse pushed a commit that referenced this pull request Nov 14, 2014
@hueniverse

Copy link
Copy Markdown
Contributor

So basically, I was using arguments because I was lazy keeping the arguments in sync. No reason to go through all this trouble when I can just be explicit.

@arb

arb commented Nov 14, 2014

Copy link
Copy Markdown
Contributor Author

There are other times where if you refer to arguments and do things like options = options || {} and options is an argument, that will be unoptimizable as well. That is a really sneaky one.

Also, sometimes it has nothing to do with being lazy, having optional arguments basically make you have to do the arguments dance.

@lock

lock Bot commented Jan 9, 2020

Copy link
Copy Markdown

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock Bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants