Aug 20, 2012; 15:32
French, Shelane
strategies for deprecating code
I have a tag that I made long, long ago. I had no real good name for the
tag, so I named it 'mytag'. Now I have a new tag with a better name and a
better method of handling the stuff within the tag. However, the old tag
name is used everywhere. Is it better to alias the old tag within the new
or the new within the old? Also, the old tag has a parameter that is not
needed in the new tag since the use for that parameter is taken care of
within the new code.
//Option One:
define_tag('mynewawesometag', -required='firstparam',
-optional='secondparam');
If(lasso_tagexists('mytag'));
Return(mytag(-firstparam=#firstparam, -secondparam=#secondparam));
Else;
//new code
// use only -firstparam
Return(new output based on firstparam);
/If;
define_tag;
//Option Two:
define_tag('mytag', -required='firstparam', -required='secondparam');
If(lasso_tagexists('mynewawesometag'));
Return(mynewawesometag(-firstparam=#firstparam));
Else;
//do old code with both params
Return(output);
/If;
/define_tag;
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Aug 21, 2012; 00:05
Ke Carlton
Re: strategies for deprecating code
Aug 20, 2012; 18:14
Trevor Borgmeier
Re: strategies for deprecating code