by andybak · 6y ago · 0 comments
1. Don't use parentheses in comments. They make things more visually confusing when javascript imposes enough syntactic clutter as it is.
2. What's with /* */ ? Doesn't js allow keyword arguments?
3. Your method names are probably a little short for my taste. I'd be happier with sequence() and parallel() instead of seq() and par(). Par especially seems a little too obscure when first encountering it.
4. "cx = location | cr = radius" - why not allow both forms? - or just the clearer one rather than the shorter one.
----
> 2. What's with /* */ ? Doesn't js allow keyword arguments?
It does since version 6. Example:
The function call anim_interpolated(ease, name, val, time) should be rewritten thus:
anim_interpolated({ease, name, val, time})
The corresponding function definition should be rewritten thus:
function anim_interpolated({ease, name, val, time}) { … }
No.
I wonder if passing in a dict is a good alternative in this case. More syntax clutter but at least the params have some semantic meaning.