Closed AshlinHarris closed 1 year ago
I think the most used argument should be the style and the custom message.
So i would suggest to put the framerate at the end, before the Expr
.
Also spinner is good for rapid and easy use and this suggests not to have much customization. On the other hand the function does not give the scope...
That makes sense.
Should style
always take priority over msg
? That is, should @spinner some_string f()
assume that some_string
is a style, not a message? Alternatively, we could assume the first Symbol
is a style, the firstString
is a message, and the first Number
is a framerate.
Each of these arguments could be optional with a default value supplied. Any other argument (preceding message, mode) could be an named argument (e.g., mode=:random
).
That makes sense.
Should
style
always take priority overmsg
? That is, should@spinner some_string f()
assume thatsome_string
is a style, not a message? Alternatively, we could assume the firstSymbol
is a style, the firstString
is a message, and the firstNumber
is a framerate.Each of these arguments could be optional with a default value supplied. Any other argument (preceding message, mode) could be an named argument (e.g.,
mode=:random
).
Isn't it to complicated and confusing to have different argument order based on the style type ? I mean, choosing an unique convention is often the best choice
Currently, users can supply the following spinner parameters:
At the end of the list, an expression is required.
Example:
@spinner :clock 0.1 "LOADING" "..." sleep(5)
Default arguments are provided by
timer_spin
in a lazy way (My bad!). It is assumes the first argument is style, the second is the framerate, etc. So we haveWhat inputs should be accepted? Some possibilities:
What order of arguments should be accepted, and how can they be parsed by type?