You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like this idea quite a bit. But your API is a little... well, crowded might be a good word. I think that, rather than a positional parameter list, a configuration object would provide both more flexibility and better readability:
The other thing I would suggest is that allow an undefined value as the starting choice for the target parameter. I know that this would make the algorithm harder to get off the ground; you'll have to go seeking for an appropriate initial value that works. But it could lead to a nicer user experience, using a token such as __ (which is not defined) as a placeholder:
I'll be interested to see the extensions to other methods.
One thing I didn't say was that, at least for the simple parameter-position-only case (I'm not so sure about the object-property one), the __ as placeholder also should allow the user to skip the position parameter.
I like this idea quite a bit. But your API is a little... well, crowded might be a good word. I think that, rather than a positional parameter list, a configuration object would provide both more flexibility and better readability:
The other thing I would suggest is that allow an undefined value as the starting choice for the target parameter. I know that this would make the algorithm harder to get off the ground; you'll have to go seeking for an appropriate initial value that works. But it could lead to a nicer user experience, using a token such as
__
(which is not defined) as a placeholder:Note the change to
params
. This makes it much clearer what you're looking for.(I also posted this suggestion on comp.lang.javascript, where I first saw this.)
The text was updated successfully, but these errors were encountered: