Forum OpenACS Development: Re: ad_parameter deprecated in favor of parameter::get?

Collapse
Posted by Jun Yamog on
It would be nice if we can decide which one we should use.  And stick with it.

I find it weird that this was only brought up now.  There was discussion about this, the outcome was named parameters.  I am not saying that Jonathan's reason is not valid.  But people did try to follow name parameters and even made crude docs about it.

I liked named parameters because:

- it has -foo:required, but then again if no named parameters will have a convention of all required that is ok.
- it has {-foo "bar"}, its nice to have this shortcut.
- i can add a parameter to an existing proc without breaking existing code.  But then again no name parameters can do this too.

I like no named parameters because:

- as pointed out by Jonathan, it follows the tcl way.
- it reads better for those procs with 1 or few args.

I think we must discuss this what are the plus and minuses and the core group can give its decision.  And the decision be placed in the docs, not to be digged up on this forum.  It has to be a clear guideline.

Frankly I find the comments made to Tammy inappropriate.  It is this very attitude that makes newbies go away.  Also even though that Jonathan volunteer and have cvs access to change  the api.  What about those like us who just read the docs and followed the code and use parameter::get -paramater?  Tough luck for us and our existing code will break on the next upgrade?  And we should replace existing code as well?

Where do we go?  What will be our real guideline for this?