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

Collapse
Posted by tammy m on
Hmmm

I still disagree. Just because Tcl procs in a language don't do it, doesn't mean code in a framework shouldn't do it. They are 2 completely different beasts.

I'll ignore the personal slam about "you are probably this" -- just not pertinent really. It's ok if we disagree and you don't even have to try to talk about what not so good a C or otherwise programmer I am;)

Writing "my_proc -userId $user_id" is not silly. It tells callers that my_proc expects a userId as an argument. That is very helpful. It could expect any sort of data structure representing a user, but it doesn't it expects a userId. 2 different things. And the docs are usually not very explicit in details on parameters and return codes. And sure if you happen to name your userId $user_id then it seems to make sense however, in real code the user id may very well be named anything else from $my_array(1) to $the_dog_ate_my_shorts and then it's not so nice. The other way, the parameter clearly enforces it.

I still think that regardless of what OpenACS is not, it should strive to be useable by as wide a user base as it can. Here's to making a widely used, user friendly, open source, web framework for the masses!