[Golist] upcoming Go version 0.4.5...

Michael Avila michaelxxoa at gmail.com
Sat Mar 22 13:49:56 PDT 2008


My two cents worth.
After the constructor runs the instance should be ready to use. If you can
make the constructor more tidy, providing it still works properly, I would
do so. Any parameters that don't relate to preparing the instance for use
are a convenience. I don't like a lot of parameters, even the tidy version
is a few too many for me. Since you sub-class LinearGo I don't think the
amount of parameters are as much of an issue as they would be if you had to
instantiate and use LinearGo within your applications code.

On Sat, Mar 22, 2008 at 9:10 AM, Moses Gunesch <moses at goasap.org> wrote:

> Need y'all's opinion on something...
>
> Unfortunately LinearGo's constructor inputs are going to need to change on
> the next release (see my previous email – this release will add a *
> useFrames* option). Sorry, I know that is really inconvenient because it
> means that your tween classes will need to be fixed – but this should be the
> last time this happens for LinearGo.
>
> A *useFrames* option will be added to the constructor. I also realized at
> this update that *easing* has an *extraEasingParams* setting, but *easingOnCycle
> *doesn't – oops. So *extraEasingParamsOnCycle* is being added to LinearGo
> as well.
>
>
> Option A: This would be the most complete version of the constructor – on
> the downside it's pretty ugly.
>
> public function LinearGo(delay  : Number=NaN,
> duration : Number=NaN,
> easing : Function=null,
> extraEasingParams : Array=null,
> cycles : Number=NaN,
> easingOnCycle : Function=null,
> extraEasingParamsOnCycle: Array=null, // NEW
> useRelative : Boolean=false,
> useRounding : Boolean=false,
> useFrames : Boolean=false, // NEW
> pulseInterval : Number=NaN)
>
>
> Option B: Omit the 2 *extraEasing* inputs considering how infrequently
> they are actually used. This cleans up the constructor quite a bit.
> Subclasses could of course choose to add them back in if that is their
> preference, and of course any tween can first be instantiated then these
> special settings can be applied afterwards.
>
> (If you're unfamiliar, these params are settings for Back & Elastic
> easings like overshoot and amplitude, very few people know how to use them
> effectively so they are practically a moot point.)
>
>
> public function LinearGo(delay   : Number=NaN,
> duration  : Number=NaN,
> easing  : Function=null,
> cycles : Number=NaN,
> easingOnCycle : Function=null,
> useRelative : Boolean=false,
> useRounding : Boolean=false,
> useFrames : Boolean=false,
> pulseInterval : Number=NaN)
>
> So what do you think... completeness or tidiness?
>
> -moses
>
>
>
>
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080322/90d5b32a/attachment-0003.html 


More information about the GoList mailing list